benilla-re systems structs docs

TextBlockGenerateFont

function · unassigned · primitive

Address
0x44d040 · 632 bytes, up to 0x44d2b7
Signature
void * __fastcall (const char *name, uint32_t flags, float size)
Meaning
Returns a handle on the cached font of a name, flags and size over the screen scale, creating it; 0 on failure
Confidence
verified, proof one
Name from
the community database (idb)
Finding
font/api#text-block-fonts
Test
font::text_block_font_size_difftest, font::text_block_font_flags_difftest

Finding: Text block fonts in font: fonts, strings and batches

TextBlockGenerateFont(name, flags, size) (0x44d040) returns a font handle, or 0 with error 0x57 for a null or empty name. It divides the size by s_screenScaleY and makes the float 1.0 when it is 1.0 or more, or NaN. Fonts are cached by the key %s-%d-%f of the name, the flags as passed and that size, compared exactly although the hash folds case. A new key creates the font with GxuFontCreateFont, flag bit 0 giving 1, bit 1 giving 2 and bit 2 giving 8, and on failure frees its entry and returns 0. The factory refuses a size of 1 or more or of 0 or less, so a quotient outside (0, 1), the clamped 1.0 included, fails the load.

The derivation is in the doc.

Callers 12

Callees 13

Calls and jumps by a bare address, from tables/calls.tsv.