Skip to content

modern-pdf-lib


modern-pdf-lib / isOpenTypeCFF

Function: isOpenTypeCFF()

isOpenTypeCFF(data): boolean

Defined in: src/assets/font/otfDetect.ts:19

Detect whether font data is an OpenType font with CFF outlines. CFF-based OpenType fonts start with the ASCII bytes "OTTO". TrueType-based OpenType fonts start with 0x00010000 or "true".

Parameters

data

Uint8Array

Raw font file bytes.

Returns

boolean

true if the font is a CFF-based OpenType font.

Released under the MIT License.