TPDFlibColorGlyph

Text, fonts, colour glyphs

Description

Carries the mapped glyph index, colour-table description and optional SVG or bitmap payload returned by the colour-font inspection APIs

Syntax

Delphi

TPDFlibColorGlyph = Record
  Kind: TPDFlibColorGlyphKind;
  GlyphIndex: Integer;
  PaletteCount: Integer;
  PaletteEntryCount: Integer;
  DescriptionJSON: WideString;
  Data: AnsiString;
  MIMEType: AnsiString;
  PPEMX: Integer;
  PPEMY: Integer;
  OriginX: Integer;
  OriginY: Integer;
End;

Fields

KindThe representation selected from COLR, SVG or embedded bitmap data
GlyphIndexThe mapped or explicitly requested zero-based glyph index
PaletteCountThe number of CPAL palettes for a COLR glyph
PaletteEntryCountThe number of colour entries in each CPAL palette
DescriptionJSONStructured COLR paint data or metadata describing the SVG or bitmap source
DataThe exact SVG document or bitmap payload; empty for COLR glyphs
MIMETypeThe payload media type such as image/svg+xml, image/png or image/jpeg
PPEMXThe horizontal pixels-per-em value for a bitmap strike
PPEMYThe vertical pixels-per-em value for a bitmap strike
OriginXThe sbix horizontal origin offset when available
OriginYThe sbix vertical origin offset when available

Remarks

COLR fixed-point values remain integer fields in JSON with names such as alphaF2Dot14 and xxF16Dot16, avoiding locale-dependent decimal conversion and preserving the original table precision

See also

TPDFlibColorGlyphKind, GetFontColorGlyph, GetFontColorGlyphByIndex