Documentation ¶
Overview ¶
The bitmap package loads a bitmap font from an image using a descriptor file.
A bitmap font is a font with glyphs that is literally bitmapped, with a transparent pixel being `0`, and any opaque pixel being `1`.
A descriptor file describes the size (width, height) of each glyph. It is a JSON file, the same name as the font itself. An example: the font is `fnt.png`, the descriptor will be `fnt.json`, and would look like: ` [
{ "Char": " ", "Width": 7, "X": 1, "Y": 8, "W": 2, "H": 0, "Ox": 0, "Oy": 0 }, { "Char": "!", "Width": 5, "X": 4, "Y": 1, "W": 3, "H": 7, "Ox": 0, "Oy": 7 }, ...
`
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitmapFont ¶
type BitmapFont struct {
// contains filtered or unexported fields
}
BitmapFont holds a slice of Glyphs.
Click to show internal directories.
Click to hide internal directories.