Font Fallback
The mechanism by which a rendering engine substitutes glyphs from a secondary font when the primary font lacks coverage for a character. Ensures characters display instead of showing □ (tofu).
What is Font Fallback?
Font fallback is the mechanism by which a rendering system selects an alternative font when the primary font does not contain a glyph for a particular character. Because no single font covers the entire Unicode character set (which has over 149,000 assigned characters across 161 scripts), every text renderer must implement a strategy for gracefully handling characters that fall outside any single font's coverage.
When a font lacks a glyph for a character, the renderer walks through a prioritized list of alternative fonts until it finds one with the required glyph. If no font in the system covers the character, the renderer typically displays a fallback glyph — commonly a rectangular box, often called "tofu" (□), or a question mark in a box (▯).
CSS Font-Family Stacks
Web developers control font fallback through the CSS font-family property, which accepts a comma-separated list of fonts in priority order:
body {
font-family:
"Inter", /* Preferred: Latin, Greek, Cyrillic */
"Noto Sans", /* Wide Unicode coverage fallback */
-apple-system, /* System UI font (Apple) */
BlinkMacSystemFont,/* System UI font (Chrome/macOS) */
"Segoe UI", /* System UI font (Windows) */
sans-serif; /* Generic family (last resort) */
}
For multilingual sites, the stack should include fonts with strong coverage of the expected scripts. The Noto font family (Google's "No Tofu" project) provides consistent coverage across all Unicode scripts.
System Font Fallback Chains
Operating systems maintain their own fallback chains that activate after the CSS stack is exhausted. These are platform-specific:
| Platform | CJK Fallback | Arabic Fallback | Emoji Fallback |
|---|---|---|---|
| macOS | PingFang SC/TC/HK, Hiragino | Geeza Pro | Apple Color Emoji |
| Windows | Microsoft YaHei, Meiryo | Segoe UI Historic | Segoe UI Emoji |
| Android | Noto Sans CJK | Noto Naskh Arabic | Noto Color Emoji |
| Linux | Noto Sans CJK | Noto Naskh Arabic | Noto Color Emoji |
Tofu: The Fallback-of-Last-Resort Glyph
When no font in the entire fallback chain covers a character, the renderer displays a tofu glyph — the term coined by Google engineers during the Noto project. The name comes from the block's resemblance to a cube of tofu. The standard tofu glyph is typically a rectangular box (□, U+25A1) or a box containing the character's hex code point.
The Last Resort Font (published by Unicode Consortium) is a special font designed specifically for this case. It contains a distinct representative glyph for every Unicode block, displaying a block-specific symbol inside a rectangular frame. This helps users and developers identify which script a character belongs to, even when no rendering font is available.
Performance and CJK Challenges
CJK fonts present special performance challenges in the fallback model because CJK fonts are enormous — a full CJK font covering all unified ideographs can be 5–30 MB. Loading multiple CJK fonts as part of a fallback chain has severe performance implications for web pages.
The unicode-range CSS descriptor allows a font to declare which code points it covers, so the browser can skip loading a font if none of the page's characters fall in its range.
Quick Facts
| Property | Value |
|---|---|
| Fallback trigger | Character missing from primary font's cmap table |
| Fallback glyph name | "Tofu" — empty rectangular box |
| Last Resort Font | Published by Unicode Consortium, script-labelled boxes |
| CSS property | font-family (comma-separated priority list) |
| CSS optimization | unicode-range descriptor (selective loading) |
| Google's goal | "Noto" — No Tofu across all scripts |
| CJK font size | Typically 5–30 MB for full coverage |
관련 용어
타이포그래피의 더 많은 용어
CSS @font-face descriptor specifying which Unicode code points a font should cover. …
Em: 폰트 크기와 같은 너비. En: Em의 절반. 엠 대시 너비, 엠 …
Modern font format developed by Microsoft and Adobe supporting up to 65,535 …
문자가 오른쪽에서 왼쪽으로 흐르는 텍스트 방향. 아랍어, 히브리어, 타아나 문자 등에서 사용되며, …
Fonts downloaded by the browser to render text, declared via CSS @font-face. …
앞의 기본 문자에 붙어 수정하는 문자. 일반 범주: Mn(비공백), Mc(공백 결합), Me(둘러싸기). …
가로 또는 세로 공간을 표현하지만 눈에 보이는 글리프가 없는 문자. 유니코드는 서로 …
폰트가 렌더링하는 문자의 시각적 표현. 하나의 문자가 여러 글리프를 가질 수 있고(합자, …
전진 너비가 0인 문자 — 렌더링에서 보이지 않지만 텍스트 동작에 영향을 줍니다. …
문장의 일부를 구분하거나 범위를 나타내는 데 사용되는 구두점. 유니코드는 하이픈(‐), 엔 대시(–), …