TypographyMay 8, 2026 · Updated Oct 13, 2026 · 3 min read

How to Use OpenType Features in CSS

Enable ligatures, tabular figures, small caps and stylistic sets in CSS, and check what your font file really supports. Measured on this site's own DM Sans: ligatures were already on, tabular-nums did nothing (no tnum table), and only font-variant-caps produced small caps.

Letters, lead letters, lead — illustrating How to Use OpenType Features in CSS
✨
Try the Font Pairing Tool
Free, no signup
→
DG
Derek Giordano
Designer & Developer
In this guide
01What OpenType Features Are02Switching Them On in CSS03Measured: What Our Own Font Supports04Checking a Font Before You Rely on It

What OpenType Features Are

A font can carry alternative glyphs and rules, each switched by a four-letter tag: liga (standard ligatures such as fi and ffl), kern (kerning), tnum (tabular figures, all digits the same width), onum (oldstyle figures), smcp (small capitals), frac (fractions), ss01-ss20 (stylistic sets) and many more. Some are on by default in browsers (kern, liga, calt and the mark-positioning features); the rest you switch on.

Switching Them On in CSS

.table  { font-variant-numeric: tabular-nums; }
.abbr   { font-variant-caps: all-small-caps; }
.title  { font-variant-ligatures: discretionary-ligatures; }
.alt    { font-feature-settings: "ss01" 1; }   /* only when no font-variant-* keyword exists */

Prefer the font-variant-* properties: they cascade independently and, for small caps, let the browser synthesise them if the font has none. font-feature-settings is a single property, so setting it on a child replaces every feature set on the parent.

Measured: What Our Own Font Supports

This site serves DM Sans, JetBrains Mono and Chakra Petch from the files Google Fonts delivers. We listed their OpenType tables with fontTools and then tested the features in Chromium with DM Sans at 48px (October 14, 2026; results in our test folder):

Font file (Latin subset)Features present
DM Sanscalt, ccmp, dnom, frac, kern, liga, locl, mark, mkmk, numr
JetBrains Monocalt, ccmp, frac, locl, mark
Chakra Petchccmp, frac, kern, liga, locl, mark, mkmk
TestResult
"office affine" default vs font-variant-ligatures: none262px vs 264px: ligatures were already on
"1111" vs "0000"60px vs 132px: proportional digits
The same with tabular-nums60px vs 132px: no change, the file has no tnum
"Html Css" with font-variant-caps: small-caps201px → 186px: browser-synthesised small caps
The same with font-feature-settings: "smcp" 1201px: no change, nothing to switch on

Two practical lessons. First, a feature you enable is silently ignored when the font lacks it, so tabular-nums on a DM Sans price table does not line the digits up: check the font, or set number columns in a font that has tnum (JetBrains Mono, being monospaced, aligns anyway). Second, for small caps use font-variant-caps, which falls back to synthesised capitals, rather than the smcp tag, which does nothing without real small-cap glyphs. Synthesised small caps are scaled-down capitals and look lighter than true ones.

Checking a Font Before You Rely on It

Frequently Asked Questions

Do OpenType features affect performance?+
Switching a feature on downloads nothing extra, because it is either in the file or not. What costs bytes is choosing a larger font file that contains more features; subsetting removes features you may need.
Do all Google Fonts support OpenType features?+
No. Support varies by family, and the file a font service delivers can be a subset of the full release. The DM Sans file this site serves has fractions and ligatures but no tabular figures or small caps; families such as Inter and IBM Plex ship far more. Check the actual file with Wakamai Fondue or fontTools.
What’s the difference between font-variant and font-feature-settings?+
font-variant is high-level and semantic. font-feature-settings is low-level and tag-based. font-variant cascades correctly; font-feature-settings gives access to features font-variant doesn’t cover.
Try it yourself

Use the Font Pairing Tool — free, no signup required.

⚡ Open Font Pairing Tool
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.