Table of Contents

Method TryGetGlyphIdForCid

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

TryGetGlyphIdForCid(int, out ushort)

Resolves a character identifier to a glyph id in a CID-keyed CFF program.

public bool TryGetGlyphIdForCid(int characterId, out ushort glyphId)

Parameters

characterId int

The CID.

glyphId ushort

The glyph id.

Returns

bool

true when the program is CID-keyed and names that CID.

Remarks

A CID-keyed program's charset maps glyph id to CID, and the two coincide only when the charset is the identity — which is the common case in a PDF and therefore the case that hides the bug. A subset produced from a CJK face routinely has a non-identity charset, where treating the CID as a glyph id draws a different character rather than none.