Widely availableSupported across all major browsers. Safe to use in production.

Overview

The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
48
15
34
9.1
48
9.3
CSS at-rule

The font-feature-settings CSS descriptor allows you to define the initial settings to use for the font defined by the @font-face at-rule. You can further use this descriptor to control typographic font features such as ligatures, small caps, and swashes, for the font defined by @font-face. The values for this descriptor are the same as the…

140
140
34
10
140
10
CSS property
normal
16
15
15
9.1
18
9.3
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (16)
Notes 5 item(s)
Implementation note
  • The ISO/IEC CD 14496-22 3rd edition suggests using the `ssty` feature to provide glyph variants more suitable for use in scripts (for example primes used as superscripts). Starting with Firefox 29, this is done automatically by the MathML rendering engine. The ISO/IEC CD 14496-22 3rd edition also suggests applying the `dtls` feature to letters when placing mathematical accents to get dotless forms (for example dotless i, j with a hat). Starting with Firefox 35, this is done automatically by the MathML rendering engine. You can override the default values determined by the MathML rendering engine with CSS.
  • From Firefox 4 to Firefox 14 (inclusive), Firefox supported an older, slightly different syntax. See OpenType Font Feature support in Firefox 4.
Compatibility
  • Available with a vendor prefix: -webkit- (129)
  • From Firefox 129 the `-webkit-font-feature-settings` alias has been added to support sites that are still supporting the vendor prefix.
  • Available with a vendor prefix: -moz- (15)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (18)
Notes 3 item(s)
Implementation note
  • The ISO/IEC CD 14496-22 3rd edition suggests using the `ssty` feature to provide glyph variants more suitable for use in scripts (for example primes used as superscripts). Starting with Firefox 29, this is done automatically by the MathML rendering engine. The ISO/IEC CD 14496-22 3rd edition also suggests applying the `dtls` feature to letters when placing mathematical accents to get dotless forms (for example dotless i, j with a hat). Starting with Firefox 35, this is done automatically by the MathML rendering engine. You can override the default values determined by the MathML rendering engine with CSS.
  • From Firefox 4 to Firefox 14 (inclusive), Firefox supported an older, slightly different syntax. See OpenType Font Feature support in Firefox 4.
Compatibility
  • Available with a vendor prefix: -moz- (15)

Syntax

CSS
/* Enable ligatures */
.ligatures {
  font-feature-settings: "liga" 1, "clig" 1;
}

/* Old-style numbers */
.old-style-nums {
  font-feature-settings: "onum" 1;
}

/* Small caps */
.small-caps {
  font-feature-settings: "smcp" 1;
}

Live demo

combinecharacter(ligature)

font-feature-settings combinecharacter(ligature) demo.

PreviewFullscreen

oldstylenumbercharacter

font-feature-settings oldstylenumbercharacter demo.

PreviewFullscreen

smo-lcapss

font-feature-settings smo-lcapss demo.

PreviewFullscreen

Use cases

  • Using font-feature-settings

    The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Make sure visual changes are conveyed appropriately to assistive technology.

Powered by web-features