font-feature-settings

Term side of the Card.
Topic: Font Features
Unit title: font-feature-settings
Categories: Property
Explanation side of the Card

Explanation: The property that provides low-level control over OpenType font features, such as ligatures, small caps or stylistic alternates. It allows fine-tuning how text is displayed by enabling or disabling specific font features, which often enhances typographic quality.

Browser compatibility:
  • The chrome browser supports this feature starting from version 48.
  • The edge browser supports this feature starting from version 15.
  • The firefox browser supports this feature starting from version 34.
  • The safari browser supports this feature starting from version 9.1.
Availability: 

Example

Wrongcss
.price {
  font-feature-settings: "tnum" 1;
}
Rightcss
.price {
  font-variant-numeric: tabular-nums;
}

font-variant-numeric sets the same feature without overriding other features set elsewhere.

Common mistakes

  • A nested rule sets one feature and all the other inherited features turn off.
  • Enabling a feature the font does not include and nothing changes.

Key points

  • Common features use font-variant-* properties, with font-feature-settings only for features they lack.
  • Each declaration lists every needed feature, since a new value replaces the whole list.
  • Feature tags are four-letter quoted strings like "ss01".

Interview questions

What is the difference between font-feature-settings and font-variant?

font-variant-* are high-level properties that combine safely. font-feature-settings sets raw OpenType tags and replaces the whole list each time.

How do I know which features a font supports?

Check the font's documentation or inspect the file with a font tool; the browser ignores tags the font does not have.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy