Bitmap Colour Glyph Strikes
GetRegisteredColorGlyphInfo and DrawRegisteredColorGlyph support bitmap colour glyphs stored in CBDT/CBLC or sbix tables
Strike selection
TargetPixelsPerEm selects the strike with the smallest absolute ppem distance, whilst zero selects the largest available strike for maximum retained detail
CBDT/CBLC selection supports index subtable formats 1, 2, 3 and 5 plus PNG image formats 17 and 19
sbix selection validates every strike window against maxp.numGlyphs, accepts PNG, JPEG and TIFF graphic records, and resolves dupe records through a bounded 16-level chain with cycle rejection
Placement and decoding
THPDFOpenTypeColorGlyphInfo.PixelsPerEmX and PixelsPerEmY report the selected strike size, whilst OriginOffsetX and OriginOffsetY report the bitmap bottom-left offset from the glyph baseline in strike pixels
Native PNG decoding preserves its alpha channel and emits an image soft mask, whilst native JPEG decoding emits opaque RGB data
Placement scales decoded pixels by FontSize / PixelsPerEmY and applies the stored baseline origin so mixed vector and bitmap glyphs align consistently
TIFF records and any unsupported or undecodable payload continue through OnColorGlyphRasterize with their original MIME type and bytes
Resource bounds
The parser accepts at most 4,096 sbix strikes, 16 duplicate indirections and 64 MiB per extracted bitmap asset, and rejects truncated, overlapping, out-of-range, or signature-mismatched records before page output