@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 ​
readonlyobjType:"TTC"|"DFont"
Defined in: src/font-collection.ts:10
Identifier for the collection. One of 'TTC' or 'DFont'.
type ​
readonlytype:"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 ​
| Parameter | Type | Description |
|---|---|---|
postscriptName | string | the PostScript name of the font |
Returns ​
TrueTypeFont<SFNTDirectory> | null