CffFontProgramParser Class

Definition

The managed default parser for CFF programs: FontFile3 streams of subtype Type1C (a bare CFF font) and OpenType programs whose outlines are a "CFF " table. Glyph outlines are Type 2 charstrings, interpreted into cubic curves.

public sealed class CffFontProgramParser : IFontProgramParser

Remarks

ISO 32000-2 §9.9 (Tables 124 and 125) and §9.6.5.2; Adobe Technical Note #5176 (The Compact Font Format Specification) and #5177 (The Type 2 Charstring Format); the OpenType specification for the sfnt wrapper ("CFF ", "cmap", "name"). The charset and the encoding are exposed through TryGetGlyphId(String, out Int32), GetGlyphName(Int32) and BuiltInEncoding (StandardEncoding, ExpertEncoding, or a custom encoding with its supplements named through the charset), which a Type 1 font uses to select glyphs by name (§9.6.5.2; also for OpenType programs, whose "cmap" a Type 1 font does not use, §9.9).

Hints are parsed and ignored; the deprecated dotsection is a no-op; endchar with four arguments composes an accented character from StandardEncoding components. A CID-keyed CFF program (CIDFontType0C, or any CFF whose Top DICT begins with ROS; §18-19) draws each glyph with the Private DICT (local subroutines, bias, widths) of the Font DICT its FDSelect entry names, in the space of the first Font DICT's FontMatrix concatenated with the Top DICT's (Adobe Technical Note #5014 §4.2); a glyph whose Font DICT has another matrix is mapped into that space. Its charset holds CIDs, so it has no glyph names and no built-in encoding; a CIDFontType0 selects its glyphs by CID. CFF2 (OpenType variable fonts) is not read.

Reading is lenient: a damaged INDEX, DICT, charset or encoding is read as far as it goes, with a diagnostic; a damaged charstring drops its glyph (Invalid), never draws it in part. Every glyph is bounded by the 48-entry argument stack, 10 levels of subroutines and MaxCharStringOperators.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (1)

Methods (2)