What Parse(ReadOnlySpan<Byte>, CMapContext?) needs beyond the CMap file's bytes: how deviations are treated, the limits on hostile data, and where diagnostics go.
public sealed class CMapContext
ISO 32000-2 §9.7.5; Adobe TN 5014 §7. A context created with the public constructor stands alone: its diagnostics are kept in
Diagnostics only, which is how a CMap is parsed outside a document. Inside a document (the Encoding of a
Type 0 font), diagnostics are recorded on the document against the CMap stream, once per code.
Thread safety: a context may be shared by parses on several threads.
kind:method, kind:property, kind:ctor. Press Esc to clear.CMapContext()Initializes a new instance of the CMapContext class that stands alone, outside any document.DefaultMaxEntriesThe default of MaxEntries.DefaultMaxUseCMapDepthThe default of MaxUseCMapDepth: Adobe TN 5014 §7.4 allows usecmap to nest five levels.DiagnosticsGets the diagnostics reported through this context: the first of each code, in order.MaxEntriesGets how many mapping and codespace entries a CMap file may hold; the rest are dropped with a diagnostic. Default 1,000,000. A range counts once however many codes it covers.MaxUseCMapDepthGets how many CMaps may be chained through usecmap above the one parsed; deeper ones are ignored with a diagnostic. Default 5.ReadingModeGets how deviations are treated: in Strict mode the first one throws.