Skip to content

Interface: ParseFontMetricsOptions ​

Options for parseFontMetrics.

Properties ​

font? ​

readonly optional font?: string | number

Which font to read out of a file that holds several: a 0-based index, or a name matched case-insensitively against the family, full, and PostScript names (listFontFaces lists them). Omitted selects the first.

Collections (.ttc/.otc) are why this exists: msgothic.ttc is three fonts and cambria.ttc is two. The selector means the same thing for a plain TTF/OTF, which is a one-entry list, so a wrong index or an unmatched name is an error there rather than being ignored.