Documentation ¶
Overview ¶
Package banner is a dynamic ASCII art banner generator.
This package supports loading fonts at runtime and can parse arbitrary ASCII art fonts.
Index ¶
Constants ¶
const GlyphTable = `` /* 211-byte string literal not displayed */
GlyphTable describes the ordering and formatting expected by the banner package when parsing font data.
This table can be used to generate new fonts using patorjk's timeless ASCCI generator at http://patorjk.com/software/taag/. Copy this table and paste it into the generator to get a nice chunk of ASCII goodness that can be used as a font with this package.
You may need to add an extra new-line between each row to ensure the parser can separate them correctly.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
A Font is a data type that contains information necessary to render text using arbitrary ASCII art fonts.
var DefaultFont *Font
func NewFont ¶
NewFont attempts to read the font data stored in file. If this function cannot parse the font data, an error will be returned.
Fonts can be created using http://patorjk.com/software/taag/. Select a font, then paste in the GlyphsTable text. Copy the output and place it in a file or use NewFontString to parse the font.
func NewFontString ¶
NewFontString attempts to parse the font data passed in as a string. If this function cannot parse the font data, an error will be returned.