benilla-re systems structs docs

TextBlockGetMaxCharsWithinHeight

function · unassigned · primitive

Address
0x44d960 · 233 bytes, up to 0x44da48
Signature
int __fastcall (void *block, const char *text, float size, float width, float height, void *arg6, float arg7, float gap, uint32_t flags)
Meaning
Counts the characters that fit a height through GxuFontGetMaxCharsWithinHeight, 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 1

Callees 4

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