@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 ​
| Parameter | Type |
|---|---|
streamOrBuffer | Uint8Array<ArrayBufferLike> | DecodeStream |
Returns ​
TrueTypeCollection
Inherited from ​
FontCollection.constructor
Properties ​
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
objType | readonly | "TTC" | undefined | Identifier for TrueTypeCollection objects. | FontCollection.objType FontCollection.objType | src/true-type-collection.ts:50 |
type | readonly | "TTC" | undefined | Deprecated Use TrueTypeCollection#objType instead! | FontCollection.type FontCollection.type | src/true-type-collection.ts:55 |
objType | readonly | "TTC" | 'TTC' | Identifier for TrueType collection objects, always 'TTC'. | FontCollection.objType | src/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 ​
A lazily loaded array of fonts contained in the collection.
Implementation of ​
Inherited from ​
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 ​
| Parameter | Type |
|---|---|
name | string | Uint8Array<ArrayBufferLike> |
Returns ​
TrueTypeFont<SFNTDirectory> | null
Inherited from ​
probe() ​
staticprobe(buffer):boolean
Defined in: src/true-type-collection.ts:71
Parameters ​
| Parameter | Type |
|---|---|
buffer | Uint8Array |
Returns ​
boolean