Skip to content

@pdfa-lab/fontkit / TrueTypeCollection

Class: TrueTypeCollection ​

Defined in: src/true-type-collection.ts:46

A file container for multiple TrueTypeFont programs.

Extends ​

Implements ​

Constructors ​

Constructor ​

new TrueTypeCollection(streamOrBuffer): TrueTypeCollection

Defined in: src/true-type-collection.ts:75

Parameters ​

ParameterType
streamOrBufferUint8Array<ArrayBufferLike> | DecodeStream

Returns ​

TrueTypeCollection

Inherited from ​

FontCollection.constructor

Properties ​

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
objTypereadonly"TTC"undefinedIdentifier for TrueTypeCollection objects.FontCollection.objType FontCollection.objTypesrc/true-type-collection.ts:50
typereadonly"TTC"undefinedDeprecated Use TrueTypeCollection#objType instead!FontCollection.type FontCollection.typesrc/true-type-collection.ts:55
objTypereadonly"TTC"'TTC'Identifier for TrueType collection objects, always 'TTC'.FontCollection.objTypesrc/true-type-collection.ts:63

Accessors ​

fonts ​

Get Signature ​

get fonts(): TrueTypeFont<SFNTDirectory>[]

Defined in: src/true-type-collection.ts:107

A lazily loaded array of fonts contained in the collection.

Returns ​

TrueTypeFont<SFNTDirectory>[]

A lazily loaded array of fonts contained in the collection.

Implementation of ​

FontCollection.fonts

Inherited from ​

FontCollection.fonts

Methods ​

getFont() ​

getFont(name): TrueTypeFont<SFNTDirectory> | null

Defined in: src/true-type-collection.ts:89

Get a specific font with a known PostScript name.

Parameters ​

ParameterType
namestring | Uint8Array<ArrayBufferLike>

Returns ​

TrueTypeFont<SFNTDirectory> | null

Inherited from ​

FontCollection.getFont


probe() ​

static probe(buffer): boolean

Defined in: src/true-type-collection.ts:71

Parameters ​

ParameterType
bufferUint8Array

Returns ​

boolean