Table of Contents

Method Create

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

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

fontProgram ReadOnlyMemory<byte>

The font bytes. The reader keeps a reference and decodes lazily.

sourceName string

A source identifier used in diagnostics.

faceIndex int

The face index inside a collection; zero for a single-face font.

diagnostics IConversionDiagnostics

The diagnostics sink, or null to discard diagnostics.

Returns

GlyphOutlineReader

The reader.

Exceptions

ArgumentNullException

sourceName is null.

FormatException

The program is malformed or uses an unsupported outline format.