Table of Contents

Method TryGetGlyphId

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

TryGetGlyphId(string, out ushort)

Resolves a glyph name to a glyph id, for programs that name their glyphs.

public bool TryGetGlyphId(string glyphName, out ushort glyphId)

Parameters

glyphName string

The glyph name, for example Ccedilla.

glyphId ushort

The glyph id.

Returns

bool

true when the program names a glyph that way.

Remarks

Only a name-keyed CFF program can answer. TrueType names live in the optional post table, which subset programs routinely omit and which is never the authority on a TrueType glyph's identity — its cmap is. A consumer that needs a TrueType glyph from a name should map the name to a character and look that up instead.