Links

BigText

The big text printer can be used to write big headlines

Basic Usage

// Print a large text with the LetterStyle from the standard theme.
// Useful for title screens.
pterm.DefaultBigText.WithLetters(putils.LettersFromString("PTerm")).Render()
// Print a large text with differently colored letters.
pterm.DefaultBigText.WithLetters(
putils.LettersFromStringWithStyle("P", pterm.NewStyle(pterm.FgCyan)),
putils.LettersFromStringWithStyle("Term", pterm.NewStyle(pterm.FgLightMagenta))).
Render()
// LettersFromStringWithRGB can be used to create a large text with a specific RGB color.
pterm.DefaultBigText.WithLetters(
putils.LettersFromStringWithRGB("PTerm", pterm.NewRGB(255, 215, 0))).
Render()

Options

Name
Type
Description
BigCharacters
map[string]string
Dictonary to convert normal letters into big ones
Letters
Letters
Styled letters
Writer
io.Writer
Sets a custom writer

Using Options

Methods

This printer implements the RenderablePrinter interface.
Method
Description
Render()
Prints to the terminal or uses the specified Writer
Srender()
Returns the rendered string

Full Specification

pkg.go.dev contains the full specification for this printer and more technical descriptions.
Last modified 11mo ago