benilla-re systems structs docs

GlyphBitmapLoad

function · gx · primitive

Address
0x5d1120 · 475 bytes, up to 0x5d12fa
Signature
uint8_t __fastcall (void *face, uint32_t em, uint32_t ch, int32_t ascender, void *out, uint32_t flag, uint32_t pad)
Meaning
Loads and renders a glyph through the font engine and copies its bitmap into a record under a new buffer
Confidence
verified, proof one
Finding
gx/glyphs#glyph-bitmap-load
Test
font::rasterize_glyph_difftest

Finding: Glyph bitmap load in gx: glyph bitmaps

0x5d1120(face, em, char, ascender, out, flag, pad) returns 0 for a null face, face size or out (error 0x57), or when loading fails; otherwise 1. It loads and renders the glyph (0x5d1300): 0x7ce960 first, then 0x7cdb40 with the load flags 0x208a, or 0x20c2 when flag is non-zero, then 0x7cec20 with render mode 0, or 1 when flag is set. It then reads the glyph slot's bitmap (+0x4c rows, +0x50 width, +0x54 pitch, +0x58 pixels) and allocates a zeroed buffer of rows times pitch bytes under IGxuFontGlyph.cpp (line 0x93), copying the pixels in; the record's rows are clipped to em. A glyph with no bitmap gets a blank buffer of em rows and (em + 3) / 4 columns.

The derivation is in the doc.

Callers 1

Callees 5

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