![]() |
CHGame 0.3.0
Libraries for the CHGame handheld
|
A whole bitmap font, for gfx_setFont(): glyph bitmaps, glyph records, the character range and the line spacing. More...
#include <CHGfx_gfxfont.h>
Public Attributes | |
| uint8_t * | bitmap |
| concatenated glyph bitstreams | |
| GFXglyph * | glyph |
| glyph records, one per character | |
| uint16_t | first |
| first character code present | |
| uint16_t | last |
| last character code present | |
| uint8_t | yAdvance |
| baseline-to-baseline line spacing | |
A whole bitmap font, for gfx_setFont(): glyph bitmaps, glyph records, the character range and the line spacing.
first..last is a contiguous character range; glyph[] has last-first+1 entries. The two pointers are non-const to match Adafruit's struct, which is why every font header casts on init.
bitmap is one flat MSB-first bitstream with all glyphs concatenated. A glyph occupies exactly width*height bits starting at bitmapOffset; rows are NOT padded to byte boundaries, so glyph row r begins at bit bitmapOffset*8 + r*width.
Fonts are made with extras/fontconvert.py (or Adafruit's own fontconvert); see Fonts.
| uint8_t* GFXfont::bitmap |
concatenated glyph bitstreams
| GFXglyph* GFXfont::glyph |
glyph records, one per character
| uint16_t GFXfont::first |
first character code present
| uint16_t GFXfont::last |
last character code present
| uint8_t GFXfont::yAdvance |
baseline-to-baseline line spacing