GetFontColorGlyphByIndex
Text, fonts, colour glyphs
Description
Returns the COLR, SVG-in-OpenType, sbix or CBDT/CBLC representation attached to a zero-based glyph index
Syntax
Delphi
Function TPDFlib.GetFontColorGlyphByIndex(FontID, GlyphIndex, PaletteIndex, PreferredPPEM: Integer; Out Glyph: TPDFlibColorGlyph): Integer;Parameters
| FontID | A font handle returned by a font creation or loading API |
|---|---|
| GlyphIndex | The zero-based OpenType glyph index |
| PaletteIndex | The zero-based CPAL palette to resolve |
| PreferredPPEM | The desired bitmap strike size, or 0 for the largest strike |
| Glyph | Receives the colour representation and optional payload |
Return values
Returns 1 when colour data exists or 0 when the handle, glyph index or colour tables are unsupported
Remarks
This overload avoids a second cmap lookup when a shaping engine or previous inspection call already supplied the glyph index
The lightweight colour-table reader is retained under the shared font-cache byte budget and is reused by both colour-glyph entry points