font-feature-settings
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://fontfyi.com/iframe/glossary/font-feature-settings/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://fontfyi.com/glossary/font-feature-settings/
Add a dynamic SVG badge to your README or docs.
[](https://fontfyi.com/glossary/font-feature-settings/)
Use the native HTML custom element.
CSS property to control OpenType features — ligatures, small caps, tabular numbers, stylistic alternates. Use font-variant for simpler cases.
The font-feature-settings CSS property gives you direct access to OpenType font features — the advanced typographic capabilities built into professional fonts. Features like ligatures, small caps, tabular numbers, contextual alternates, and swashes are controlled through four-letter OpenType feature tags.
/* Enable tabular (monospaced) numbers for data tables */
.price-column {
font-feature-settings: "tnum" 1;
}
/* Enable small capitals */
.label {
font-feature-settings: "smcp" 1;
}
/* Enable common and discretionary ligatures */
.editorial-text {
font-feature-settings: "liga" 1, "dlig" 1;
}
/* Disable ligatures (useful in code editors) */
code {
font-feature-settings: "liga" 0, "calt" 0;
}
Prefer high-level properties when available:
The CSS specification introduced dedicated properties for the most common features. These are more readable and compose better:
/* Preferred over font-feature-settings for these cases */
.text {
font-variant-numeric: tabular-nums;
font-variant-caps: small-caps;
font-variant-ligatures: common-ligatures discretionary-ligatures;
}
Use font-feature-settings for features that don't have a dedicated property, or when you need precise control that the high-level properties don't offer.
Common OpenType feature tags:
| Tag | Feature | Use case |
|---|---|---|
liga |
Common ligatures | fi, fl combinations |
dlig |
Discretionary ligatures | Decorative combinations |
smcp |
Small caps | Abbreviations, labels |
tnum |
Tabular numbers | Tables, code |
onum |
Oldstyle numbers | Running text |
frac |
Fractions | 1/2 → ½ |
calt |
Contextual alternates | Letter pairs |
ss01–ss20 |
Stylistic sets | Font-specific variants |
cv01–cv99 |
Character variants | Individual glyph alternates |
Checking which features a font supports:
Not every font includes every feature. Inter has excellent support for tnum, calt, and several stylistic sets. EB Garamond has smcp, onum, and swsh. You can inspect a font's features using tools like the Wakamai Fondue web app or FontDrop.
/* Combining multiple features */
.refined-body-text {
font-feature-settings:
"kern" 1, /* Kerning */
"liga" 1, /* Ligatures */
"onum" 1, /* Oldstyle figures */
"calt" 1; /* Contextual alternates */
}
One important caveat: font-feature-settings values don't cascade intuitively. Setting font-feature-settings: "tnum" 1 on a child element overrides all inherited font-feature-settings from parents, not just the tnum value. This is why high-level properties like font-variant-numeric are preferable when available — they cascade independently.
相关术语
相关工具
展示此概念的字体
了解更多
法律和金融网站需要权威感、清晰度和精确性。如何选择传达专业性和可信度的排版。
字体评测两款最受欢迎、支持编程连字的编程字体一较高下。JetBrains Mono 与 Fira Code——哪个更适合你的 IDE?
字体评测JetBrains Mono 由开发者为开发者设计。深入解析这款以编程连字优先保证可读性的编程字体。
字体评测Inter 从诞生之初就是为电脑屏幕而设计。一份完整指南,介绍这款成为现代 UI 设计默认选择的字体。