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
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.
kind:method, kind:property, kind:ctor. Press Esc to clear.FormatsGets the formats the parser reads: an engine falls back to it for a program that declares one of them.CanParse(ReadOnlySpan<Byte>)Tells, cheaply, whether the bytes are a program this parser reads, from their signature (such as 00 01 00 00, OTTO, %!).Parse(ReadOnlyMemory<Byte>, FontProgramContext)Parses a font program.