The font-variant-alternates
CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in @font-feature-values
.
/* Keyword values */ font-variant-alternates: normal; font-variant-alternates: historical-forms; /* Functional notation values */ font-variant-alternates: stylistic(user-defined-ident); font-variant-alternates: styleset(user-defined-ident); font-variant-alternates: character-variant(user-defined-ident); font-variant-alternates: swash(user-defined-ident); font-variant-alternates: ornaments(user-defined-ident); font-variant-alternates: annotation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* Global values */ font-variant-alternates: inherit; font-variant-alternates: initial; font-variant-alternates: revert; font-variant-alternates: revert-layer; font-variant-alternates: unset;
The @font-feature-values
at-rule can define names for alternative glyph functions (stylistic
, styleset
, character-variant
, swash
, ornament
or annotation
), associating the name with OpenType parameters. This property allows those human-readable names (defined in @font-feature-values
) in the stylesheet.