Engineering Guides

Fixing Missing Glyphs & Tofu Boxes: cmap Coverage and CSS Fallbacks

Debug missing glyph tofu boxes (.notdef), audit cmap table coverage before subsetting, keep punctuation intact, and build safe CSS fallback stacks.

5 min readUpdated:

Quick Answer

Tofu boxes (□) appear when text requests a Unicode codepoint missing from the active font's cmap table and no fallback font supplies it, forcing the engine to draw glyph 0 (.notdef). Prevent tofu by running your real copy through a Missing-Character checker first, retaining punctuation and currency signs when subsetting, and terminating every CSS font-family stack with dependable system fallbacks.

Why .notdef tofu boxes and fallback font flashes happen

Every OpenType font maps Unicode codepoints to glyph outlines through its cmap table. When a font is over-subsetted—or lacks localized characters like €, ¥, —, ® or CJK Extension B ideographs—text engines fall back to glyph index 0 (.notdef), rendered as an empty rectangle or crossed box.

Even when browsers mask missing glyphs by borrowing from another installed OS font, mismatched stroke weight and baseline metrics create jarring visual flashes mid-sentence.

  • Missing smart punctuation: curly quotes (‘ ’ “ ”), em-dashes (—), and non-breaking spaces (U+00A0) stripped during naive subsetting.
  • Missing currency & UI symbols: €, ¥, £, ©, ®, ™, and arrows (→) omitted from basic ASCII presets.
  • Partial CJK or Latin Extended coverage: rare surnames, accented European characters (ß, ñ, ł, ç), or full-width punctuation missing from cmap.

Safe CSS font-family fallback stacks and subsetting rules

Never ship a bare font-family: 'BrandFont'; declaration without a full fallback chain. Pair your subsetted WOFF2 with a metric-matched fallback face and OS native sans/CJK/symbol fallbacks, and always enable punctuation and digit retention when trimming glyph sets.

:root {
  --font-sans: 'InterSubset', 'Inter Fallback', system-ui, -apple-system,
    'PingFang SC', 'Hiragino Sans', 'Malgun Gothic', 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font-sans);
}

Pre-flight cmap and OpenType checks before shipping

Before deploying a trimmed webfont, PDF bundle, or game UI atlas, verify both the Unicode subtable structure and your live copy coverage in browser RAM so zero .notdef rectangles slip into production.

  • Confirm cmap format 4 (Basic Multilingual Plane) and format 12 (32-bit supplementary planes) cover your target scripts.
  • Verify whether an icon or wordmark uses Private Use Area codepoints (U+E000–U+F8FF) that OS fallback fonts will never supply.
  • Test real multi-language strings (prices, dates, user names) in Missing-Character Check before building assets.

Frequently asked questions

Why does a missing character show a system font in Chrome but a tofu box in PDFs?

Web browsers scan installed system fallback fonts character by character, whereas PDF renderers, Canvas APIs, and game UI atlases often stay locked to one font and draw its .notdef rectangle.

Which glyphs are dropped most often when subsetting fonts manually?

Em-dashes (—), curly apostrophes (’), non-breaking spaces, currency signs (€, ¥, £), and legal symbols (®, ™) are frequently missed when pasting only sample ASCII prose.

Can I extract only Latin letters, digits, and punctuation from a large CJK font?

Yes. Extract Latin from Font and Font Subsetter retain Basic Latin, Latin-1 Supplement, and common punctuation while trimming tens of thousands of unused ideographs.

Authoritative References

Tools used in this guide

Related formats

Related Comparisons

More engineering guides