font-synthesis

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

Syntax

This property can take any one of the following forms:

  • The keyword value none.
  • Either of the keyword values weight and style.
  • Both the keyword values weight and style.

Values

none
Indicates that neither bold nor italic typeface may be synthesized.
weight
Indicates that a bold typeface may be synthesized if needed.
style
Indicates that an italic typeface may be synthesized if needed.

Description

Most standard Western fonts include italic and bold variants, but many novelty fonts do not. Fonts used for Chinese, Japanese, Korean and other logographic scripts tend not to include these variants, and synthesizing them may impede the legibility of the text. In these cases, it may be desirable to switch off the browser's default font-synthesis.

Formal definition

Initial valueweight style
Applies toall elements. It also applies to ::first-letter and ::first-line.
Inheritedyes
Computed valueas specified
Animation typediscrete

Formal syntax

none | [ weight | style ]

Examples

Disabling font synthesis

HTML

<em class="syn">Synthesize me! ็ซ™็›ดใ€‚</em>
<br/>
<em class="no-syn">Don't synthesize me! ็ซ™็›ดใ€‚</em>

CSS

em {
  font-weight: bold;
}
.syn {
  font-synthesis: style weight;
}
.no-syn {
  font-synthesis: none;
}

Result

Specifications

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

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
font-synthesisChrome No support NoEdge No support NoFirefox Full support 34
Full support 34
No support 33 — 34
Disabled
Disabled From version 33 until version 34 (exclusive): this feature is behind the layout.css.font-features.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera No support NoSafari Full support 9WebView Android No support NoChrome Android No support NoFirefox Android Full support 34Opera Android No support NoSafari iOS Full support 9Samsung Internet Android No support No

Legend

Full support
Full support
No support
No support
User must explicitly enable this feature.
User must explicitly enable this feature.

See also