The font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.
| Related at-rule | @font-face |
|---|---|
| Initial value | n/a (required) |
| Media | all |
| Computed value | as specified |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
/* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <custom-ident> value */ font-family: examplefont;
<family-name><family-name>where
<family-name> = <string> | <custom-ident>+
@font-face {
font-family: examplefont;
src: url('examplefont.ttf');
}
| Specification | Status | Comment |
|---|---|---|
| CSS Fonts Module Level 3 The definition of 'font-family' in that specification. | Candidate Recommendation | Initial definition |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 4 | 12 | 3.5 | 6 | 9 | 3.1 |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | 2.2 | ? | 12 | 4 | 12 | 3.1 | Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-family