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:
| offset | holds |
|---|---|
+0x00, +0x04 | registry link: next and previous font |
+0x08, +0x0c | link offset (the strings' link is at +0x10) and head of the font's string list |
+0x14 | the glyph hash (its vtable 0x80a8cc); buckets +0x30, mask +0x38 |
+0x3c | the kerning hash (vtable 0x80a8bc); buckets +0x58, mask +0x60 |
+0x64, +0x68 | link offset and head of the glyph recency list |
+0x70 | the face handle |
+0x74 | the face file name, 0x104 bytes |
+0x178, +0x17c | atlas cell size; baseline ascender in pixels |
+0x180, +0x184 | flags; the requested size |
+0x188 | advance adjustment ratio |
+0x18c | eight atlas pages of 0x18 bytes |
+0x24c | the rendered pixel size |
The derivation is in the doc.
Fields 17
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | void * | m_prevLink | Holds the address of the previous link in the font registry | verified, proof one | font/api#font-object |
0x0004 | 4 | CGxFont * | m_next | Holds the next font of the registry | verified, proof one | font/api#font-object |
0x0008 | 4 | uint32_t | m_stringLinkOffset | Holds the offset of the link in a string of this font | verified, proof one | font/api#font-object |
0x000c | 4 | void * | m_strings | Holds the head of the font's string list | verified, proof one | font/api#font-object |
0x0030 | 4 | void * | m_glyphBuckets | Holds the glyph hash buckets, 12 bytes each | verified, proof one | font/api#font-object |
0x0038 | 4 | uint32_t | m_glyphMask | Holds the glyph hash mask, -1 while empty | verified, proof one | font/api#font-object |
0x0064 | 4 | uint32_t | m_recencyLinkOffset | Holds the offset of the recency link in a glyph descriptor | verified, proof one | font/api#font-object |
0x0068 | 4 | void * | m_recencyHead | Holds the head of the glyph recency list | verified, proof one | font/api#font-object |
0x0070 | 4 | void * | m_face | Holds the face handle | verified, proof one | font/api#font-object |
0x0074 | 260 | char[260] | m_name | Holds the face file name | verified, proof one | font/api#font-object |
0x0178 | 4 | uint32_t | m_cellSize | Holds the atlas cell size: pixel size plus 0, 2 or 4 | verified, proof one | font/api#font-object |
0x017c | 4 | uint32_t | m_ascender | Holds the baseline ascender in pixels | verified, proof one | font/api#font-object |
0x0180 | 4 | uint32_t | m_flags | Holds bit 0 outline, 1 monochrome, 2 page-texture variant, 3 thick | verified, proof one | font/api#font-object |
0x0184 | 4 | float | m_requestedSize | Holds the requested size as a fraction of the screen height | verified, proof one | font/api#font-object |
0x0188 | 4 | float | m_advanceAdjust | Holds the ratio that scales a negative kerning | verified, proof one | font/api#font-object |
0x018c | 192 | uint8_t[192] | m_pages | Holds eight atlas page records of 0x18 bytes | verified, proof one | font/api#font-object |
0x024c | 4 | uint32_t | m_pixelSize | Holds the rendered pixel size, at most 32 | verified, proof one | font/api#font-object |