We use cookies to improve your experience. Learn more in our Privacy policy.
font-variant-alternates
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.
Initial value | normal |
Applies to | all elements. It also applies to ::first-letter and ::first-line. |
Syntax
font-variant-alternates: character-variant(user-defined);
Values
This keyword deactivates alternate glyphs.
This keyword enables historical forms — glyphs that were common in the past but not today. It corresponds to the OpenType value hist.
This function enables stylistic alternates for individual characters. The parameter is a font-specific name mapped to a number. It corresponds to the OpenType value salt, like salt 2.
This function enables stylistic alternatives for sets of characters. The parameter is a font-specific name mapped to a number. It corresponds to the OpenType value ssXY, like ss02.
This function enables specific stylistic alternatives for characters. It is similar to styleset(), but doesn't create coherent glyphs for a set of characters; individual characters will have independent and not necessarily coherent styles. The parameter is a font-specific name mapped to a number. It corresponds to the OpenType value cvXY, like cv02.
This function enables swash glyphs. The parameter is a font-specific name mapped to a number. It corresponds to the OpenType values swsh and cswh, like swsh 2 and cswh 2.
This function enables ornaments, like fleurons and other dingbat glyphs. The parameter is a font-specific name mapped to a number. It corresponds to the OpenType value ornm, like ornm 2.
Note: In order to preserve text semantics, font designers should include ornaments that don't match Unicode dingbat characters as ornamental variants of the bullet character (U+2022). Be aware that some existing fonts don't follow this advice.
This function enables annotations, like circled digits or inverted characters. The parameter is a font-specific name mapped to a number. It corresponds to the OpenType value nalt, like nalt 2.
Browser support
font-variant-alternates | chrome | edge | firefox34 | ie | opera | safari |
annotation | chrome | edge | firefox34 | ie | opera | safari |
character_variant | chrome | edge | firefox34 | ie | opera | safari |
ornaments | chrome | edge | firefox34 | ie | opera | safari |
styleset | chrome | edge | firefox34 | ie | opera | safari |
stylistic | chrome | edge | firefox34 | ie | opera | safari |
swash | chrome | edge | firefox34 | ie | opera | safari |