TextBlockGetMaxCharsWithinHeight
function · unassigned · primitive
- Address
0x44d960· 233 bytes, up to0x44da48- 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.
| flag | font flag |
|---|---|
0x0040 | 0x002 |
0x0100 | 0x001 |
0x0200 | 0x004 |
0x0400 | 0x008 |
0x0800 | 0x010 |
0x1000 | 0x040 |
0x2000 | 0x100 |
0x4000 | 0x200 |
0x8000 | 0x400 |
0x0080 | 0x800 |
The derivation is in the doc.
Callers 1
Callees 4
- DivideByScreenScaleX screencoord
- DivideByScreenScaleY screencoord
- GxuFontGetMaxCharsWithinHeight unassigned
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.