font-display
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://fontfyi.com/iframe/glossary/font-display/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://fontfyi.com/glossary/font-display/
Add a dynamic SVG badge to your README or docs.
[](https://fontfyi.com/glossary/font-display/)
Use the native HTML custom element.
A CSS descriptor that controls how a web font is displayed during loading. Values: auto, block, swap, fallback, optional.
font-display is a CSS descriptor used inside @font-face rules to control exactly how a browser handles font loading — specifically, what to show users while a web font is downloading. It's one of the most impactful single properties for web typography performance and a key lever for improving Core Web Vitals scores.
The descriptor accepts five values, each representing a different strategy along the spectrum from "show nothing" to "always show something":
@font-face {
font-family: 'Nunito';
src: url('/fonts/nunito.woff2') format('woff2');
font-display: swap; /* Most common choice for body text */
}
The five values:
/* block — invisible text for ~3s, then swap (FOIT) */
font-display: block;
/* swap — show fallback immediately, swap when ready (FOUT) */
font-display: swap;
/* fallback — ~100ms invisible, then fallback, swap if font arrives quickly */
font-display: fallback;
/* optional — ~100ms invisible, then fallback, no swap (font cached for next visit) */
font-display: optional;
/* auto — browser decides (usually same as block) */
font-display: auto;
font-display: swap is the Google Fonts default and the right choice for most body text. It eliminates invisible text (FOIT) by immediately rendering a fallback font, then swapping when the web font arrives. The trade-off is a visible style change — manageable with fallback font metric adjustments.
font-display: optional is the most performance-friendly option. The browser shows the fallback if the font isn't available within a very short window, and never performs a late swap — eliminating CLS entirely. The font downloads silently in the background and is used on subsequent page loads once cached. This is ideal for non-critical decorative fonts.
font-display: fallback splits the difference: a tiny invisible window (~100ms, imperceptible to users), then a fallback font, with a swap only if the font arrives within a reasonable time window (typically 3 seconds). It's a good choice when you want to avoid both long invisible periods and very late jarring swaps.
When using Google Fonts via their CDN URL, you can enable swap with a simple parameter:
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
For self-hosted fonts with performance budgets, optional combined with preloading gives the best LCP and zero CLS:
@font-face {
font-family: 'Source Sans 3';
src: url('/fonts/source-sans-3.woff2') format('woff2');
font-display: optional;
}
Understanding font-display is fundamental to any serious web font performance strategy. It directly affects three user experience dimensions: when text first appears, whether layout shifts occur, and how consistent the visual experience feels across connection speeds.
관련 용어
관련 도구
이 개념을 보여주는 폰트
더 알아보기
웹 폰트를 더 빠르게 로드하기 위한 실전 체크리스트입니다 — 프리로딩, 서브셋팅, font-display, 실제로 효과 있는 최신 모범 사례를 다룹니다.
CSS 타이포그래피Tailwind CSS에 Google Fonts나 커스텀 폰트를 추가합니다 — font-family 테마 확장, 효율적인 폰트 로딩, Tailwind 타이포그래피 모범 사례를 다룹니다.
CSS 타이포그래피Google Fonts를 셀프 호스팅하면 로딩, 개인정보, 캐싱을 완전히 제어할 수 있습니다. 다운로드부터 배포까지 단계별 가이드입니다.
CSS 타이포그래피CSS @font-face로 커스텀 폰트를 로드하는 단계별 튜토리얼입니다 — 문법, 포맷 선택, 바로 복사해 쓸 수 있는 실전 예제를 다룹니다.