This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note: This feature is available in Web Workers.
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
The variant property of the FontFace interface programmatically retrieves or sets font variant values.
A string containing a descriptor as it would be defined in a style sheet's @font-face rule.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
variant |
35 | 79 | 41 | 22 | 10–13.1 | 35 | 41 | 22 | 10–13.4 | 4.0 | 37 | 10–13.4 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant