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 a CFF header (major version 1, header size of at least 4, offSize 1 to 4: Adobe Technical Note #5176 §6) and an OpenType program (OTTO) with a "CFF " or "CFF2" table and no "glyf" table (which the TrueType parser reads).