Documentation ¶
Overview ¶
Package font implements a basic type for the font face of ASCII characters. Only 3 font sizes are currently supported. Glyphs are described as simple bitmaps in rectangular palettes of uniform area.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
Font represents a collection of characters or symbols that constitute an ASCII-only font face.
func (*Font) Bitmap ¶
Bitmap constructs a bitmap (uint16 slice) describing the given char using the reciever f's font size, foreground color, and background color. Each of the uint16 elements are RGB565-formatted pixel colors with native byte ordering.
type Size ¶
type Size byte
Size stores an arbitrary enumerated value of the 3 supported Font sizes.
const ( Small Size = iota Medium Large // enum indices NumSize MinSize Size = Small MaxSize Size = Large )
Constants defining the enumerated value of the 3 supported Font sizes.
The _values_ assigned to each identifier declared here have no relation to the actual width or height of their respective Font, and are subject to change in the future.