benilla-re systems structs docs

CHARCODEDESC

struct · font · 112 bytes

Meaning
Holds a cached glyph: its atlas cell, metrics and UV rectangle
Confidence
verified, proof one
Finding
font/glyphs#finding-or-making-a-glyph

Finding: Finding or making a glyph in font: glyph cache and atlas

0x5cabd0(code) returns the cached descriptor of a character code, making it when missing. A hit moves the descriptor to the front of the recency list. A miss rasterizes the glyph, places it in a page (making a page if needed, evicting the least recently used glyph when the pages are full) and enters it in the hash.

The derivation is in the doc.

Fields 10

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_codeHolds the character codeverified, proof onefont/glyphs#finding-or-making-a-glyph
0x00284int32_tm_pageHolds the atlas page index, -1 before placementverified, proof onefont/glyphs#finding-or-making-a-glyph
0x002c4int32_tm_rowHolds the atlas row, -1 before placementverified, proof onefont/glyphs#finding-or-making-a-glyph
0x00304int32_tm_cellX0Holds the first texel column of the cellverified, proof onefont/glyphs#finding-or-making-a-glyph
0x00484int32_tm_advanceHolds the integer pixel advanceverified, proof onefont/metrics#glyph-width-and-step-base
0x004c4floatm_stepBaseHolds the step base metricverified, proof onefont/metrics#glyph-width-and-step-base
0x00504floatm_widthHolds the width metricverified, proof onefont/metrics#glyph-width-and-step-base
0x00584int32_tm_gapHolds the rows the glyph's quad is raised by, negative when its ink overflows the cellverified, proof onefont/glyphs#glyph-vertical-terms
0x005c4uint32_tm_topPadHolds the blank rows above the ink in the cellverified, proof onefont/glyphs#glyph-vertical-terms
0x006016float[4]m_uvHolds v_top, u_left, v_bottom and u_right of the cell, each over 256verified, proof onefont/glyphs#pages-and-cells