coderef

@font-faceBaseline · Widely available

The @font-face CSS at-rule creates a custom font-family value. The at-rule's descriptors set the font's name, source, and various display settings.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 20, 2016. Widely available since Mar 20, 2019.

Browser support

DesktopChrome
1–35Not supported
36+Supportedsince Jul 16, 2014
Current: 155
Edge
12–13Not supported
14+Supportedsince Aug 2, 2016
Current: 154
Firefox
1–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157
Safari
1–9.1Not supported
10+Supportedsince Sep 20, 2016
Current: 27
MobileChrome Android
18–35Not supported
36+Supportedsince Jul 16, 2014
Current: 155
Firefox Android
4–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157
Safari iOS
1–9.3Not supported
10+Supportedsince Sep 13, 2016
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: CSSFontFaceRule.

Feature detection

JS · check before using
if ("CSSFontFaceRule" in globalThis) {
  // CSSFontFaceRule is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (15). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
CSSFontFaceRule1123.53.11842
CSSFontFaceRule.style1123.53.11842
@font-face1123.53.11842
@font-face.OpenType_CBDT_CBLC6679✕✕66✕✕
@font-face.OpenType_SBIX6679✕9.166✕9.3
@font-face.WOFF6123.55.11845
@font-face.WOFF_236143910363910
@font-face.font-family4123.53.11842
@font-face.src4123.53.11842
@font-face.src.drop_invalid_item✕✕109✕✕109✕
@font-face.src.format_keyword10810810541081055
@font-face.src.format_variations66176211666211
@font-face.src.tech_keyword1081081071710810717
@font-face.unicode-range112363.118363
<url>112111841