benilla-re systems structs docs

CGxFont

struct · font · 592 bytes

Meaning
Holds a font: its face, glyph and kerning caches, atlas pages and metrics
Confidence
verified, proof one
Finding
font/api#font-object

Finding: Font object in font: fonts, strings and batches

A font is 0x250 bytes. Its fields, by offset:

offsetholds
+0x00, +0x04registry link: next and previous font
+0x08, +0x0clink offset (the strings' link is at +0x10) and head of the font's string list
+0x14the glyph hash (its vtable 0x80a8cc); buckets +0x30, mask +0x38
+0x3cthe kerning hash (vtable 0x80a8bc); buckets +0x58, mask +0x60
+0x64, +0x68link offset and head of the glyph recency list
+0x70the face handle
+0x74the face file name, 0x104 bytes
+0x178, +0x17catlas cell size; baseline ascender in pixels
+0x180, +0x184flags; the requested size
+0x188advance adjustment ratio
+0x18ceight atlas pages of 0x18 bytes
+0x24cthe rendered pixel size

The derivation is in the doc.

Fields 17

offsetsizetypenamemeaningconfidencefinding
0x00004void *m_prevLinkHolds the address of the previous link in the font registryverified, proof onefont/api#font-object
0x00044CGxFont *m_nextHolds the next font of the registryverified, proof onefont/api#font-object
0x00084uint32_tm_stringLinkOffsetHolds the offset of the link in a string of this fontverified, proof onefont/api#font-object
0x000c4void *m_stringsHolds the head of the font's string listverified, proof onefont/api#font-object
0x00304void *m_glyphBucketsHolds the glyph hash buckets, 12 bytes eachverified, proof onefont/api#font-object
0x00384uint32_tm_glyphMaskHolds the glyph hash mask, -1 while emptyverified, proof onefont/api#font-object
0x00644uint32_tm_recencyLinkOffsetHolds the offset of the recency link in a glyph descriptorverified, proof onefont/api#font-object
0x00684void *m_recencyHeadHolds the head of the glyph recency listverified, proof onefont/api#font-object
0x00704void *m_faceHolds the face handleverified, proof onefont/api#font-object
0x0074260char[260]m_nameHolds the face file nameverified, proof onefont/api#font-object
0x01784uint32_tm_cellSizeHolds the atlas cell size: pixel size plus 0, 2 or 4verified, proof onefont/api#font-object
0x017c4uint32_tm_ascenderHolds the baseline ascender in pixelsverified, proof onefont/api#font-object
0x01804uint32_tm_flagsHolds bit 0 outline, 1 monochrome, 2 page-texture variant, 3 thickverified, proof onefont/api#font-object
0x01844floatm_requestedSizeHolds the requested size as a fraction of the screen heightverified, proof onefont/api#font-object
0x01884floatm_advanceAdjustHolds the ratio that scales a negative kerningverified, proof onefont/api#font-object
0x018c192uint8_t[192]m_pagesHolds eight atlas page records of 0x18 bytesverified, proof onefont/api#font-object
0x024c4uint32_tm_pixelSizeHolds the rendered pixel size, at most 32verified, proof onefont/api#font-object