Method Create
Create(ReadOnlyMemory<byte>, string, int, IConversionDiagnostics?)
Creates a reader over one font program: a TTF, an OTF, a bare CFF program, or one face
of a TTC/OTC selected by faceIndex.
public static GlyphOutlineReader Create(ReadOnlyMemory<byte> fontProgram, string sourceName, int faceIndex = 0, IConversionDiagnostics? diagnostics = null)
Parameters
fontProgramReadOnlyMemory<byte>The font bytes. The reader keeps a reference and decodes lazily.
sourceNamestringA source identifier used in diagnostics.
faceIndexintThe face index inside a collection; zero for a single-face font.
diagnosticsIConversionDiagnosticsThe diagnostics sink, or null to discard diagnostics.
Returns
- GlyphOutlineReader
The reader.
Exceptions
- ArgumentNullException
sourceNameis null.- FormatException
The program is malformed or uses an unsupported outline format.