Search Docs
Loading...
Skip to content

Interface: FontInfo

The identity of a font file: its names, weight, style, variation axes and OpenType features. A variable font is described by its default instance.

Properties#

Property Type Description
family string The typographic family name (OpenType name ID 16), or the legacy family name when the font has none.
legacyFamily string The legacy family name (name ID 1). It can name the weight too, such as “Inter Semi Bold”.
subFamily string The typographic subfamily name (name ID 17), or the legacy subfamily name (ID 2) when the font has none.
postScriptName string The PostScript name (name ID 6).
weight number The weight class from the OS/2 table, from 1 to 1000. Without one, 700 when the head table marks the font bold, otherwise 400.
fontWeight FontWeight The named weight that is closest to weight.
style FontStyle 'italic' when the font is marked italic or oblique.
isVariable boolean Whether the font has an fvar table.
variationAxes VariationAxis[] The variation axes of a variable font, in the order of its fvar table. Empty for a static font.
openTypeFeatures string[] The OpenType feature tags of the font’s GSUB and GPOS tables, such as tnum or ss01, sorted and without duplicates. setTextOpenTypeFeatures takes these tags.