CanParse(ReadOnlySpan) Method

Definition

Assembly Broadside.dll

Tells, cheaply, whether the bytes are a program this parser reads, from their signature (such as 00 01 00 00, OTTO, %!).

public bool CanParse(ReadOnlySpan<byte> data)

Parameters

data
ReadOnlySpan<Byte>

The decoded font program.

Returns

Boolean
true when the parser recognizes the bytes.

Remarks

Accepts the TrueType sfnt versions 00 01 00 00 and true, a TrueType collection (ttcf), and an OpenType program (OTTO) only when it has a "glyf" table: ISO 32000-2 Table 124 allows "glyf" outlines in OpenType streams.