CSS - font-synthesis

The font-synthesis CSS property controls which missing typefaces, bold or italic, may be synthesized by the browser.

Examples

HTML

HTML
<div class="syn">Don't try and synthesize me!</div>

CSS

CSS
.syn {font-synthesis: none;}

Result

Syntax  

CSS
font-synthesis: none;
font-synthesis: weight;
font-synthesis: style;
font-synthesis: weight style;

/* Global values */
font-synthesis: initial;
font-synthesis: inherit;
font-synthesis: unset;

Values

none
This keyword indicates that neither bold nor italic typeface must be synthesized.
weight
This keyword indicates that a bold typeface may be synthesized if needed.
style
This keyword indicates that an italic typeface may be synthesized if needed.

Formal syntax

CSS
none <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> <a href="css/value_definition_syntax#brackets" title="Brackets">[</a> weight <a href="css/value_definition_syntax#double_bar" title="Double bar">||</a> style <a href="css/value_definition_syntax#brackets" title="Brackets">]</a>

Description  

The font-synthesis CSS property controls which missing typefaces, bold or italic, may be synthesized by the browser.

Initial valueweight style
Applies toall elements. It also applies to ::first-letter and ::first-line.
Inheritedyes
Mediavisual
Computed valueas specified
Animation typediscrete
Canonical orderorder of appearance in the formal grammar of the values

Specifications  

Specification Status Comment
CSS Fonts Module Level 3
The definition of 'font-synthesis' in that specification.
Candidate Recommendation Initial definition

 

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari (WebKit)
Basic support 34 (34) [1] ? ? ? ?
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? 34.0 (34)[1] ? ? ?

[1] Experimental implementation was available since Gecko 33. It was governed by the preference layout.css.font-features.enabled defaulting to true on Nightly and Aurora only.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/font-synthesis

CSS CSS Fonts CSS Property Reference