resonance 1.0.1
Loading...
Searching...
No Matches
AFont Struct Reference

Bitmap font of one glyph image per character code. More...

#include <afont.h>

Collaboration diagram for AFont:

Public Attributes

ABitmap ** mGlyphs
short mGlyphCount
short mReserved06
short mFirstCharCode
short mLineHeight
short mBaseline

Detailed Description

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.

Member Data Documentation

◆ mGlyphs

ABitmap** AFont::mGlyphs

One glyph image per code from mFirstCharCode. +0x00

◆ mGlyphCount

short AFont::mGlyphCount

The number of entries in mGlyphs. +0x04

◆ mReserved06

short AFont::mReserved06

Neither consumer reads it. +0x06

◆ mFirstCharCode

short AFont::mFirstCharCode

The character code mGlyphs[0] draws. +0x08

◆ mLineHeight

short AFont::mLineHeight

The row advance of a newline. +0x0a

◆ mBaseline

short AFont::mBaseline

Rows between the drawing origin and the glyph top. +0x0c


The documentation for this struct was generated from the following file: