← Back to release summary

font-variant-alternates and the @font-feature-values at-rule

Category
CSS
Type
Chromium catches up
Status
Enabled by default (Chrome 111)
Intent stage
Prepare to ship

Summary

font-variant-alternates enables simpler access to glyph alternates in fonts such as as a swashes, character-variants, ornaments and more. It provides an easier method over having to use 4-letter-codes as arguments to `font-feature-settings`. font-variant-alternates refers to the @font-feature-values at-rule to map speaking feature names to OpenType feature numbers. In the font-variant-style rule, the requested feature activation becomes easy to use and to read and allows flexible combination of font features.

Motivation

As part of Interop 2022 we committed to supporting font-variant-alternates and @font-feature-values in order to reach parity with Firefox and Safari on this aspect of OpenType feature selection through CSS. The ergonomics of font-variant-alternates are better than having to know OpenType feature codes and passing them to font-feature-settings.

Standards & signals

Samples: https://roettsch.es/montecarlo.html

View on chromestatus.com