benilla-re systems structs docs

TextBlockGetTextExtent

function · unassigned · primitive

Address
0x44d670 · 221 bytes, up to 0x44d74c
Signature
void __fastcall (void *block, const char *text, int32_t bytes, float size, float *width, float extra, float unused, uint32_t flags)
Meaning
Measures a text width in screen units through GxuFontGetTextExtent, the lengths and flags converted
Confidence
verified, proof one
Finding
font/api#text-block-measures
Test
font::text_block_measure_flags_difftest

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

0x44d670(block, text, bytes, size, &width, extra, unused, flags) and 0x44d960(block, text, …, flags) call the font's measures in screen units with the block's font (+0x20): each vertical length is divided by s_screenScaleY, each horizontal one by s_screenScaleX, and the flags are mapped as below. A null block or text, a block without a font, or for 0x44d670 a null width, raises error 0x57. 0x44d670 zeroes width first and multiplies the width GxuFontGetTextExtent stores there by s_screenScaleX; 0x44d960 returns the count GxuFontGetMaxCharsWithinHeight returns.

flagfont flag
0x00400x002
0x01000x001
0x02000x004
0x04000x008
0x08000x010
0x10000x040
0x20000x100
0x40000x200
0x80000x400
0x00800x800

The derivation is in the doc.

Callers 2

Callees 5

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