Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

font-synthesis

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

Summary

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

Syntax

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

none | [ weight || style ]

Examples

HTML

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

CSS

.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

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.

文档标签和贡献者

 此页面的贡献者: duncanmcdonald, Sebastianz, fscholz, xfq, teoli
 最后编辑者: duncanmcdonald,