TrueTypeFontProgramParser Class

Definition

The managed default parser for TrueType programs: FontFile2 streams, and FontFile3 streams of subtype OpenType whose outlines are "glyf" data. The first default of the font program parser extension point.

public sealed class TrueTypeFontProgramParser : IFontProgramParser

Remarks

ISO 32000-2 §9.6.3 and §9.9 (Tables 124 and 125); Apple TrueType Reference Manual and the OpenType specification for the tables: "head", "hhea", "hmtx", "maxp", "loca", "glyf" (simple and composite glyphs), "cmap" (formats 0, 2, 4, 6, 12, 13) and "post". A TrueType collection is read too, the font chosen by FaceName or FaceIndex.

Outlines are quadratic, unhinted: glyph instructions, "fpgm", "prep" and "cvt " are skipped, never executed, so glyphs whose components only assemble through instructions (a few CJK fonts) draw scrambled. Each outline is translated by the difference between its "hmtx" left side bearing and its bounding box's left edge, as TrueType rasterizers place glyphs.

Reading is lenient: a missing "head", "hhea", "hmtx" or "maxp" is replaced by defaults with a diagnostic; only a program without "glyf" and "loca" is unusable. A damaged glyph is dropped (Invalid), never drawn in part.

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

Properties (1)

Methods (2)