@pdfa-lab/fontkit / DFont
Class: DFont ​
Defined in: src/d-font.ts:81
A file container for multiple TrueTypeFont programs.
Extends ​
Implements ​
Constructors ​
Constructor ​
new DFont(
streamOrBuffer):DFont
Defined in: src/d-font.ts:126
Parameters ​
| Parameter | Type |
|---|---|
streamOrBuffer | Uint8Array<ArrayBufferLike> | DecodeStream |
Returns ​
DFont
Inherited from ​
FontCollection.constructor
Properties ​
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
objType | readonly | "DFont" | undefined | Identifier for DFont collection objects. | FontCollection.objType FontCollection.objType | src/d-font.ts:85 |
type | readonly | "DFont" | undefined | Deprecated Use DFont#objType instead! | FontCollection.type FontCollection.type | src/d-font.ts:90 |
objType | readonly | "DFont" | 'DFont' | Identifier for DFont collection objects, always 'DFont'. | FontCollection.objType | src/d-font.ts:98 |
Accessors ​
fonts ​
Get Signature ​
get fonts():
TrueTypeFont<SFNTDirectory>[]
Defined in: src/d-font.ts:172
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/d-font.ts:151
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/d-font.ts:107
Parameters ​
| Parameter | Type |
|---|---|
buffer | Buffer |
Returns ​
boolean