CSS font-synthesis Property

The font-synthesis property controls whether a browser may generate missing font weights, styles, small capitals, and certain typographic positions.

When a font family does not contain a requested bold, italic, or other specialized face, the browser may simulate the missing appearance. The font-synthesis shorthand allows authors to permit or prevent specific kinds of synthetic typography. This can help preserve the intended appearance of a font, particularly when working with custom web fonts.

font-synthesis Syntax

The font-synthesis property accepts none, one or more synthesis keywords, or a CSS-wide keyword.

Basic Syntax

selector {
  font-synthesis: none;
}

Allow Synthetic Bold

selector {
  font-synthesis: weight;
}

Allow Synthetic Italic or Oblique

selector {
  font-synthesis: style;
}

Allow Synthetic Small Capitals

selector {
  font-synthesis: small-caps;
}

Allow Synthetic Superscripts and Subscripts

selector {
  font-synthesis: position;
}

Combine Synthesis Types

selector {
  font-synthesis: weight style;
}

Allow All Four Types

selector {
  font-synthesis: weight style small-caps position;
}

CSS-Wide Keywords

.example {
  font-synthesis: inherit;
}
.example {
  font-synthesis: initial;
}
.example {
  font-synthesis: unset;
}
.example {
  font-synthesis: revert;
}
.example {
  font-synthesis: revert-layer;
}

The none keyword must appear alone. When combining synthesis keywords, each keyword may appear only once.

Property Values

The property controls which kinds of synthesized font features the browser may create when the requested feature is missing from the selected font.

Value Description
none Prevents synthetic weight, style, small capitals, and position features.
weight Allows the browser to synthesize bold or heavier font weights.
style Allows the browser to synthesize italic or oblique font styles.
small-caps Allows the browser to synthesize small-capital letterforms.
position Allows the browser to synthesize superscript or subscript positioning.

Property Characteristics

Characteristic Value
Initial value All synthesis types permitted
Inherited Yes
Applies to All elements and text
Computed value The permitted synthesis types
Animation type Discrete
Percentages Not applicable

The shorthand resets its constituent longhand properties. Browser support for the newer small-caps and position values may differ from support for weight and style.

How It Works

Font synthesis occurs when the browser creates an approximation of a requested typographic feature that is not supplied by the selected font.

Requesting a Font Feature

.heading {
  font-family: "Example Sans", sans-serif;
  font-weight: 700;
}

If the font family contains only a regular-weight face, the browser may generate a synthetic bold appearance.

Controlling Synthesis

.heading {
  font-family: "Example Sans", sans-serif;
  font-weight: 700;
  font-synthesis: none;
}

With synthesis disabled, the browser cannot create a simulated bold face. It may instead use an available font weight according to font matching rules.

Available Font Features

When a font already provides a suitable bold, italic, small-capital, or positioned glyph design, the browser can use that feature without synthesizing it.

Font Matching Comes First

The browser attempts to select a suitable font face or feature before generating a synthetic alternative.

Important Consideration

The property controls permission to synthesize missing features. It does not directly select a font weight, italic style, or small-capital appearance.

The none Value

The none value prevents the browser from synthesizing the font features controlled by this property.

Basic Example

.text {
  font-synthesis: none;
}

Prevent Synthetic Bold

.heading {
  font-weight: 700;
  font-synthesis: none;
}

Prevent Synthetic Italic

.emphasis {
  font-style: italic;
  font-synthesis: none;
}

Using Custom Web Fonts

.brand-heading {
  font-family: "Example Brand Font", sans-serif;
  font-synthesis: none;
}

This can help prevent the browser from generating artificial styles that differ from the font designer's intended appearance.

Important Consideration

Disabling synthesis does not disable genuine bold or italic faces. If the requested feature is available in the font, the browser can still use it.

The weight Value

The weight value allows the browser to synthesize heavier font weights when a suitable weight is unavailable.

Basic Example

.heading {
  font-weight: 700;
  font-synthesis: weight;
}

Allow Weight but Not Style Synthesis

.text {
  font-synthesis: weight;
}

This permits synthetic weight while preventing the other synthesis types controlled by the shorthand.

Compare with font-weight

.heading {
  font-weight: bold;
}

The font-weight property requests a weight. The font-synthesis property determines whether the browser may simulate a missing weight.

Important Consideration

Synthetic bolding may produce less refined results than a genuine bold font face. For headings and prominent text, provide the intended weight whenever possible.

The style Value

The style value allows the browser to synthesize italic or oblique text when the requested style is unavailable.

Basic Example

.emphasis {
  font-style: italic;
  font-synthesis: style;
}

Allow Style but Not Weight Synthesis

.text {
  font-synthesis: style;
}

Compare with font-style

.emphasis {
  font-style: oblique;
}

The font-style property requests the slanted style. The font-synthesis property determines whether the browser may generate a simulated style when necessary.

True Italic vs. Synthetic Italic

A genuine italic face may contain specially designed letterforms and spacing. A synthesized style generally approximates the appearance by slanting upright glyphs.

Important Consideration

Allowing style synthesis does not guarantee that every font or browser will produce the same slant. The result depends on the font and rendering system.

The small-caps Value

The small-caps value allows the browser to synthesize small-capital letterforms when the font does not provide genuine small capitals.

Basic Example

.label {
  font-variant-caps: small-caps;
  font-synthesis: small-caps;
}

Prevent Synthetic Small Capitals

.label {
  font-variant-caps: small-caps;
  font-synthesis-small-caps: none;
}

Genuine Small Capitals

A font with genuine small-capital glyphs can provide letterforms designed specifically for that size and appearance.

Synthetic Small Capitals

When genuine small capitals are unavailable, a browser may approximate them using scaled uppercase glyphs.

Important Consideration

The small-caps synthesis keyword is a newer part of the shorthand. Check browser support before relying on it to control small-capital rendering.

The position Value

The position value allows the browser to synthesize superscript or subscript positioning when the font lacks suitable typographic glyphs.

Superscript Example

.superscript {
  font-variant-position: super;
  font-synthesis: position;
}

Subscript Example

.subscript {
  font-variant-position: sub;
  font-synthesis: position;
}

Prevent Position Synthesis

.superscript {
  font-variant-position: super;
  font-synthesis-position: none;
}

Genuine Positioned Glyphs

Some fonts provide specially designed superscript and subscript glyphs with adjusted proportions and stroke weights.

Synthetic Positioning

When these glyphs are unavailable, a browser may approximate the appearance by resizing and repositioning ordinary glyphs.

Important Consideration

The position synthesis keyword and its longhand property have limited or evolving browser support. Use semantic HTML elements such as <sup> and <sub> when the text has superscript or subscript meaning.

Combining Values

Multiple synthesis keywords can be combined to allow selected types of browser-generated font styling.

Allow Weight and Style

.text {
  font-synthesis: weight style;
}

Allow Weight and Small Capitals

.text {
  font-synthesis: weight small-caps;
}

Allow Style and Position

.text {
  font-synthesis: style position;
}

Allow All Types

.text {
  font-synthesis: weight style small-caps position;
}

Order of Keywords

The synthesis keywords can be written in different orders, but each keyword may appear only once.

.text {
  font-synthesis: style weight;
}

Invalid Combination

.text {
  font-synthesis: none weight;
}

The none keyword cannot be combined with other synthesis keywords.

Important Consideration

Combining keywords permits the listed synthesis types and disables the omitted types. It does not force the browser to synthesize a feature that is already available in the font.

Longhand Properties

The font-synthesis shorthand controls four longhand properties, allowing individual synthesis types to be managed separately.

Longhand Overview

Property Purpose
font-synthesis-weight Controls synthetic font weight.
font-synthesis-style Controls synthetic italic and oblique styles.
font-synthesis-small-caps Controls synthetic small capitals.
font-synthesis-position Controls synthetic superscript and subscript positioning.

Disable Synthetic Weight

.heading {
  font-synthesis-weight: none;
}

Disable Synthetic Style

.heading {
  font-synthesis-style: none;
}

Disable Synthetic Small Capitals

.label {
  font-synthesis-small-caps: none;
}

Disable Synthetic Position

.superscript {
  font-synthesis-position: none;
}

Shorthand Reset Behavior

.heading {
  font-synthesis-weight: none;
  font-synthesis: weight style;
}

The later shorthand resets the constituent longhand properties, including the earlier weight restriction.

Important Consideration

Use longhand properties when only one synthesis type needs to change. Support for the newer longhands may vary between browsers.

Font Matching and Synthesis

Font matching determines which available font face should be used. Font synthesis determines whether missing features may be approximated.

Font Matching Example

.heading {
  font-family: "Example Sans", Arial, sans-serif;
  font-weight: 700;
  font-style: italic;
}

The browser searches for a suitable bold italic face.

Allowing Synthesis

.heading {
  font-weight: 700;
  font-style: italic;
  font-synthesis: weight style;
}

If suitable faces are unavailable, the browser may synthesize the missing weight or style.

Disabling Synthesis

.heading {
  font-weight: 700;
  font-style: italic;
  font-synthesis: none;
}

The browser must rely on available font faces rather than creating the prohibited synthetic styles.

Font Fallbacks

Fallback fonts may contain different weights, styles, and glyph features. A fallback can therefore produce a different result even when the same synthesis settings are applied.

Important Consideration

Disabling synthesis does not prevent the browser from choosing another available font face. It only restricts the generation of artificial features.

Variable Fonts

Variable fonts can provide a continuous range of weights, styles, and other typographic variations within a single font resource.

Variable Weight Example

.heading {
  font-family: "Example Variable Sans", sans-serif;
  font-weight: 650;
  font-synthesis: none;
}

If the variable font supports the requested weight, the browser can use the genuine font variation without synthesizing bold text.

Variable Italic Example

.heading {
  font-family: "Example Variable Sans", sans-serif;
  font-style: italic;
  font-synthesis: none;
}

Variable Slant Example

.heading {
  font-family: "Example Variable Sans", sans-serif;
  font-style: oblique 12deg;
  font-synthesis: none;
}

Font Variation Axes

Variable fonts may provide registered axes such as wght, ital, and slnt. These axes supply genuine variations when supported by the font.

Important Consideration

A variable font does not necessarily contain every possible weight or style. Check the font's supported axes and ranges before disabling synthesis.

Accessibility Considerations

Font synthesis can affect the appearance and readability of text. Disabling synthesis may preserve a font's intended design, but it can also reduce the visual distinction between normal and emphasized text.

Preserve Meaningful Emphasis

<p>This is <strong>important information</strong>.</p>

The <strong> element conveys importance even when the visual weight does not change.

Avoid Removing Visible Emphasis

body {
  font-synthesis: none;
}

If the selected font lacks bold and italic faces, this declaration may prevent emphasized text from appearing visually distinct.

Provide Genuine Font Faces

When using custom fonts, include appropriate regular, bold, and italic resources so emphasis remains visible without relying on synthesis.

Test Multiple Scripts

Synthetic font styling may be unsuitable for some writing systems. Font designers may provide specific weight and style variations to preserve the intended appearance of characters.

Important Consideration

Do not disable all synthesis without checking how headings, links, emphasized text, and fallback fonts appear across the languages supported by the website.

font-synthesis Example

This example compares browser-generated bold and italic styles with synthesis disabled. It uses a locally available regular font face when possible.

The visual difference depends on the fonts installed on the device. If the browser finds genuine bold or italic faces, the examples may appear similar.

HTML Example

<div class="font-synthesis-demo">
  <p class="demo-label">Synthetic styles allowed</p>
  <p class="synthesis-allowed">Bold and Italic Typography</p>
  <p class="demo-label">Synthetic styles disabled</p>
  <p class="synthesis-disabled">Bold and Italic Typography</p>
</div>

CSS Example

.font-synthesis-demo {
  font-family: Arial, sans-serif;
}
.font-synthesis-demo p {
  margin: 0 0 16px;
}
.font-synthesis-demo .demo-label {
  font: 600 13px/1.4 Arial, sans-serif;
}
.font-synthesis-demo .synthesis-allowed,
.font-synthesis-demo .synthesis-disabled {
  font-size: 26px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.4;
}
.synthesis-allowed {
  font-synthesis: weight style;
}
.synthesis-disabled {
  font-synthesis: none;
}
Browser Result

Synthetic styles allowed

Bold and Italic Typography

Synthetic styles disabled

Bold and Italic Typography

The first example permits the browser to synthesize missing bold or italic styling. The second prevents synthesis and relies on available font faces.

Arial commonly provides genuine bold and italic faces, so the two examples may look identical. This is expected: font-synthesis controls the creation of missing styles, not the use of existing ones.

Common Mistakes

The most common mistake is assuming that font-synthesis directly changes the selected font weight or style.

Using bold as a Value

p {
  font-synthesis: bold;
}

This declaration is invalid. Use weight to permit synthetic bolding.

Using italic as a Value

p {
  font-synthesis: italic;
}

This declaration is invalid. Use style to permit synthetic italic or oblique styling.

Combining none with Other Keywords

p {
  font-synthesis: none style;
}

The none keyword must appear alone.

Repeating a Keyword

p {
  font-synthesis: weight weight;
}

Each synthesis keyword may appear only once.

Expecting Synthesis to Create a Font Face

Font synthesis approximates missing styles. It does not create a genuine bold or italic font resource.

Disabling Synthesis Without Providing Font Variants

When a custom font lacks bold or italic faces, disabling synthesis may remove the visual distinction normally used for emphasis.

Confusing font-synthesis with font-weight

The font-weight property requests a weight. The font-synthesis property controls whether a missing weight may be simulated.

Ignoring Shorthand Reset Behavior

A later font-synthesis declaration resets the synthesis longhands, potentially replacing earlier restrictions.

Assuming All Keywords Have Identical Browser Support

The newer small-caps and position values may not be supported in browsers that already support weight and style.

Important Considerations

Keep the following points in mind when using the font-synthesis property:

  • Purpose: Controls browser-generated font features.
  • Property type: Shorthand.
  • Inheritance: The constituent synthesis controls are inherited.
  • Initial behavior: Font synthesis is permitted by default.
  • none: Prevents all controlled synthesis types.
  • weight: Permits synthetic bolding.
  • style: Permits synthetic italic or oblique styling.
  • small-caps: Permits synthetic small capitals.
  • position: Permits synthetic superscripts and subscripts.
  • Combined values: Multiple synthesis keywords may be used together.
  • Keyword restrictions: none must appear alone.
  • Longhands: Four individual synthesis properties provide more specific control.
  • Shorthand reset: A shorthand declaration resets its constituent longhands.
  • Font matching: Available font faces are selected before synthesis is considered.
  • Genuine font styles: Existing bold and italic faces remain available when synthesis is disabled.
  • Custom fonts: Provide the required font weights and styles whenever possible.
  • Variable fonts: Genuine variable font axes can reduce the need for synthesis.
  • Accessibility: Ensure emphasized text remains visually distinguishable.
  • Language support: Test synthesis behavior with the writing systems used by the website.
  • Browser support: The basic property is widely supported, while newer synthesis types have more limited compatibility.

Use font-synthesis: none when preserving the original font design is important and the required font faces are available. Otherwise, allow appropriate synthesis types so missing styles can remain visually distinguishable.

Browser Support

The CSS font-synthesis property is Widely available for controlling synthetic font weight and style in modern browsers, including Chrome, Edge, Firefox, and Safari.

The newer small-caps and position synthesis controls have more limited or evolving support. Compatibility should be checked for each specific feature.

Basic Supported Example

.heading {
  font-synthesis: none;
}

Weight and Style Example

.heading {
  font-synthesis: weight style;
}

Feature Detection

@supports (font-synthesis: small-caps) {
  .label {
    font-synthesis: small-caps;
  }
}

Fallback Behavior

Browsers that do not recognize a declaration ignore it. If a newer keyword is unsupported, the entire declaration containing that keyword may be rejected.

Progressive Enhancement

.text {
  font-synthesis: weight style;
}
@supports (font-synthesis: weight style small-caps position) {
  .text {
    font-synthesis: weight style small-caps position;
  }
}

This approach preserves the older supported synthesis controls while enabling additional features in browsers that recognize the complete value.

For current compatibility information, visit Can I Use? and search for font-synthesis.

Specifications

The font-synthesis property is defined in the CSS Fonts Module, which describes browser-generated font weights, styles, small capitals, and typographic positioning.

CSS Fonts Module Level 4: Font Synthesis

The module also defines the individual synthesis controls and how they interact with available font faces.

CSS Fonts Module Level 4

For additional explanations and examples, see MDN Web Docs.

MDN Web Docs: font-synthesis