Free auditStart free
GlossaryGlossary · Performance

font-display

font-display sets how text renders while a web font loads. Block and swap periods for each value, which to pick for body text and branding, and how to test it.

3 min
read
2
sources
Oct 28, 2026
updated
Scaplet Editorial Team
author
In one line

font-display is a CSS descriptor on @font-face that controls what users see while a web font loads: invisible text, a fallback font, or a swap once the font arrives. It takes auto, block, swap, fallback or optional. swap shows text soonest and eventually uses the web font, while optional skips a late font entirely.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
`@font-face`
Set on
`auto`, `block`, `swap`, `fallback`, `optional`
Values
`auto` (browser decides)
Initial value
`swap`, or `optional` if you accept a skipped font
Fastest text
02At a glance

Anatomy of an @font-face rule

Part

font-display: swap

What it does
web.dev says it delays text the least among values that eventually show the web font, and that a late swap can be jarring
Part

font-display: optional

What it does
web.dev calls it the most performance-focused choice: text is delayed at most 100 ms and font-swap layout shifts are avoided. The tradeoff is that a late font is not used
Part

size-adjust

What it does
web.dev says it can reduce layout shift between the fallback and the web font. The 105% here is only an example value
Part

woff2 format

What it does
web.dev says WOFF2 compresses 30% better than WOFF
Branding with swap, body text with optional
@font-face {
  font-family: "BrandDisplay";
  src: url("/fonts/brand-display.woff2") format("woff2");
  font-display: swap;      /* text visible at once, swap if late */
}

@font-face {
  font-family: "BodyText";
  src: url("/fonts/body.woff2") format("woff2");
  font-display: optional;  /* skip the font if it is late, no layout shift */
  size-adjust: 105%;       /* narrows the fallback/web font size gap */
}
03How it works

Check it in 2 minutes

  1. 1

    Throttle the network

    In DevTools, set the Network panel to a slow preset and disable cache so the font arrives late.

  2. 2

    Watch the first view

    Reload and see whether text is invisible, shown in a fallback, or swapped. Compare with what you chose.

  3. 3

    Check shifts

    Look for text jumping when the font arrives. If it does, consider optional, a closer fallback or size-adjust.

  4. 4

    Test the preload

    If the font is found late, see preload. Third-party hosts also benefit from preconnect.

Is font-display set at all?
# Pull your stylesheet and look for @font-face rules without font-display
curl -s https://example.com/styles.css | grep -o '@font-face[^}]*}' | grep -vc 'font-display'
# 0 means every @font-face rule sets it. Check inline <style> blocks too.
04Your call

Which value to pick

If this fits

Use swap if

  • The typeface is part of the brand and you want it shown whenever it arrives
  • You accept a visible switch from the fallback
  • Readable text on the first paint matters more than layout stability
Or

Use optional if

  • Body text, where a system font is a fine substitute
  • Layout shift is the problem you are chasing
  • You can accept that on a slow load the web font does not appear that visit

web.dev says you can combine them, such as swap for branding and optional for body text, and that icon fonts fit these strategies poorly, so it recommends replacing them with SVGs. For the audit view of text that stays hidden while fonts load, see web fonts blocking text.

Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01What is the default font-display value?

auto, which leaves the strategy to the browser. web.dev says Chromium and Firefox block text for up to 3 seconds by default, while Safari blocks indefinitely.

02Does font-display affect layout shift?

It can. optional avoids font-swap shifts because a late font is not used. swap and block can shift when the font arrives, and size-adjust can narrow the difference between fallback and web font.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • mozilla.org
  • web.dev
  1. 01font-display (MDN)developer.mozilla.org · checked 2026-11-01
  2. 02Best practices for fonts (web.dev)web.dev · checked 2026-11-01
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly