|
resonance 1.0.1
|
Bitmap font of one glyph image per character code. More...
#include <afont.h>

Public Attributes | |
| ABitmap ** | mGlyphs |
| short | mGlyphCount |
| short | mReserved06 |
| short | mFirstCharCode |
| short | mLineHeight |
| short | mBaseline |
Bitmap font of one glyph image per character code.
The record is not polymorphic and has no RTTI, and the image retains no title for it. The name here is inferred from the two routines that consume it, ACanvas::DrawCharU() and ACanvas::DrawTextU(). It is unrelated to Rnd::Font, which draws through a material atlas rather than through a canvas.
The five members below are the ones the two consumers read. The total size is not settled, because no allocation of the record was located.
Each glyph is an ABitmap, and DrawCharU() selects the copy routine from the glyph format code rather than from any member here. A glyph therefore needs no common format across the font. The advance of one character comes from the glyph mWidth, so the font is proportional.
| ABitmap** AFont::mGlyphs |
One glyph image per code from mFirstCharCode. +0x00
| short AFont::mGlyphCount |
The number of entries in mGlyphs. +0x04
| short AFont::mReserved06 |
Neither consumer reads it. +0x06
| short AFont::mFirstCharCode |
The character code mGlyphs[0] draws. +0x08
| short AFont::mLineHeight |
The row advance of a newline. +0x0a
| short AFont::mBaseline |
Rows between the drawing origin and the glyph top. +0x0c