benilla-re systems structs docs

s_fontTable

global · ui

Address
0xcf4e80 · 40 bytes, up to 0xcf4ea7
Type
uint32_t[10]
Meaning
Holds the hash table of font records by name, built on first lookup
Confidence
verified, proof one
Finding
ui/containers#font-table

Finding: Font table in ui: list, table and array helpers

The font registry is a hash table at 0xcf4e80: main list +0x4, bucket array +0x14, mask +0x24. The font-by-name lookup 0x783870 calls 0x784810 while the mask is still −1: it sets the mask to 3 and the bucket array to 4 twelve-byte heads, empties every head's list and marks each head with 4. 0x784ca0(n) sets the bucket count to n by the template's rule (quantum 21 above 20 buckets, else the largest power of two not above the count) and, for a smaller count, unlinks and frees the dropped buckets' nodes. 0x784310(list, extra, flags) allocates extra + 0x1c bytes, constructs a record in it with 0x783520 and links it at the head of the list.

The derivation is in the doc.