GetGlyphId(Byte) Method

Definition

Namespace Broadside.Fonts
Assembly Broadside.dll

Gets the glyph id that a character code selects in the font's program; 0, the missing glyph (.notdef), when none.

public int GetGlyphId(byte code)

Parameters

code
Byte

The character code.

Returns

Int32
The glyph id in Program, or, for a font without a usable embedded program, in the program of Substitute (a name the substitute lacks falls back by the Adobe Glyph List specification's rules, and one that decomposes into several glyphs, such as f_i, has no single glyph id and gives 0 while the display list draws its components); 0 for every code when the font has neither.

Remarks

ISO 32000-2 §9.6.5.2: the code's glyph name from the font's encoding (GetGlyphName(Byte), whose base is the program's built-in encoding for an embedded font) is looked up among the program's glyph names; a name the program does not have selects .notdef.