Everything an IFontProgramParser may need beyond the program's bytes: where the program comes from, the font file stream's length entries, the limits on hostile data, and the diagnostics sink. A parsed program keeps its context and reports what it finds later (a damaged glyph) through it.
public sealed class FontProgramContext
ISO 32000-2 §9.9, Tables 124 and 125. A context created with the public constructor stands alone: its diagnostics are kept in Diagnostics only, which is how a parser is tested or used outside a document. Inside a document, diagnostics are recorded on the document against the font file stream, once per code.
Thread safety: Report(String, DiagnosticSeverity, String) may be called from several threads at once (concurrent renders of one document).
kind:method, kind:property, kind:ctor. Press Esc to clear.FontProgramContext()Initializes a new instance of the FontProgramContext class that stands alone, outside any document.DefaultMaxCharStringOperatorsThe default of MaxCharStringOperators.DefaultMaxCompositeDepthThe default of MaxCompositeDepth.DefaultMaxGlyphPointsThe default of MaxGlyphPoints.DiagnosticsGets the diagnostics reported through this context: the first of each code, in order.FaceIndexGets which font of a font collection (a TrueType collection, "ttcf") to read when FaceName names none of them; default 0.FaceNameGets the PostScript name of the font to read from a font collection, such as the font's BaseFont without a subset prefix; null to use FaceIndex.IsCidFontGets a value indicating whether the program belongs to a CIDFont, which selects glyphs by CID rather than through the program's "cmap" table (so a TrueType program for a CIDFont needs none).Length1Gets the stream's Length1: the length of a TrueType program (the whole program), or of the clear-text portion of a Type 1 program; null when absent.Length2Gets the stream's Length2: the length of a Type 1 program's encrypted portion; null when absent.Length3Gets the stream's Length3: the length of a Type 1 program's fixed-content portion; null when absent.MaxCharStringOperatorsGets how many charstring operators and operands one glyph may execute, subroutine calls and accent components included; a glyph that needs more is dropped with a diagnostic. Default 100,000.MaxCompositeDepthGets how deeply composite glyphs may nest; a deeper component is skipped with a diagnostic. Default 16.MaxGlyphPointsGets how many points one glyph may have, components included; a larger glyph is dropped with a diagnostic. Default 65,536.ReadingModeGets how deviations are treated: in Strict mode, Report(String, DiagnosticSeverity, String) throws.SourceGets the font descriptor entry the program comes from; Unspecified outside a document.SubtypeGets the font file stream's Subtype (Type1C, CIDFontType0C, OpenType), or null.Report(String, DiagnosticSeverity, String)Records a deviation found in the program and what the parser did about it. Only the first of each code is kept.