Skip to content

@pdfa-lab/fontkit / FontCollection

Interface: FontCollection ​

Defined in: src/font-collection.ts:6

A file container for multiple TrueTypeFont programs.

Extended by ​

Properties ​

fonts ​

fonts: TrueTypeFont<SFNTDirectory>[]

Defined in: src/font-collection.ts:20

A lazily loaded array of fonts contained in the collection.


objType ​

readonly objType: "TTC" | "DFont"

Defined in: src/font-collection.ts:10

Identifier for the collection. One of 'TTC' or 'DFont'.


type ​

readonly type: "TTC" | "DFont"

Defined in: src/font-collection.ts:15

Deprecated ​

Use objType instead!

Methods ​

getFont() ​

getFont(postscriptName): TrueTypeFont<SFNTDirectory> | null

Defined in: src/font-collection.ts:27

Get a specific font with a known PostScript name.

Parameters ​

ParameterTypeDescription
postscriptNamestringthe PostScript name of the font

Returns ​

TrueTypeFont<SFNTDirectory> | null