Function: listFontFaces()
listFontFaces(
data):FontFaceInfo[]
The fonts inside data, in file order. A plain TTF/OTF yields exactly one entry, so a caller never has to branch on the container format.
Identity comes from each member's own name table, which is one of the tables a collection does not share. A field is absent when the table carries no readable record for it; a font whose name table is missing or malformed still yields an entry (with only index), because the metrics do not depend on it.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | the font file's bytes |
Returns
one entry per font, index-ordered
Example
ts
listFontFaces(readFileSync('C:/Windows/Fonts/msgothic.ttc')).map((f) => f.family)