GetFontGlyphIndex

Text, fonts, glyph inspection

Description

Maps a Unicode scalar value through the selected TrueType or OpenType-TT font program and returns its glyph index

Syntax

Delphi

Function TPDFlib.GetFontGlyphIndex(FontID: Integer; CodePoint: Cardinal): Integer;

Parameters

FontIDA font handle returned by a font creation or loading API
CodePointA Unicode scalar value from U+0000 through U+10FFFF

Return values

The zero-based glyph index, including 0 for the font's notdef mapping, or -1 when the font is invalid, has no supported outline program or does not map the code point

Remarks

Unicode platform mappings and Windows format 4 and format 12 cmap subtables are supported, including supplementary-plane code points

Parsed outline programs are reused under the shared font cache budget

See also

GetFontGlyphOutline, SetFontCacheLimit