Estimated reading time : 5 min · Published
Prepare characters actually used
Collect samples in every language with accents, numbers, punctuation and long words. Include forms and errors rather than only a short heading. Check writing direction and language-specific characters within the site’s scope.
Choose necessary weights and styles before multiplying files. Reduce variants according to content and hierarchy rather than removing useful distinctions. Check licence conditions and permitted hosting with the selected source.
Distinguish UTF-16 code units, code points, grapheme clusters and drawn glyphs. JavaScript length counts UTF-16 units. Precomposed é takes one; e followed by combining accent U+0301 takes two. Each example forms one default grapheme cluster. The demonstration emoji combines three code points and five UTF-16 units into one cluster. These counts measure neither pixel width nor font glyph count.
Prepare a test with Intl.Segmenter and granularity: grapheme, recording the environment. Then examine real text with the intended and fallback fonts: correct segmentation and a received file do not prove glyph availability. Arabic lam and alef remain two default clusters even when shaping forms a ligature. When shortening a label, check the result and accessible name; slicing arbitrary UTF-16 units can split part of a sequence.
Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.
| Sequence and code points | UTF-16 units | Code points | Default clusters |
|---|---|---|---|
| é · U+00E9 | 1 | 1 | 1 |
| é · U+0065 U+0301 | 2 | 2 | 1 |
| 👩💻 · U+1F469 U+200D U+1F4BB | 5 | 3 | 1 |
| لا · U+0644 U+0627 | 2 | 2 | 2 |
Choose a loading strategy
font-display governs how a font is displayed according to its availability. MDN describes block, swap, fallback and optional. Choose according to reading needs and context, then observe actual browser behaviour.
Define a fallback suitable for the intended reading experience. Test without the custom font. A preload helps only when the file is necessary and matches the requested resource; excessive preloading may compete with essential content.
When comparing font-display, distinguish the block period, swap period and loading failure. The timer starts when the browser attempts to use the downloaded font, not necessarily at page opening. During blocking, text may use an invisible fallback; during swapping, fallback text is visible. “Short” and “extremely small” periods depend on the browser: do not turn them into a millisecond promise.
Receiving the file does not prove coverage of every character. A page may use fallback for some glyphs and the chosen font for others. Compare the same headings, inputs and messages with a cold cache, a blocked file and the available font; record browser and language. Check accents, Arabic joining and control heights rather than treating one successful network request as a typography acceptance test.
Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.
| Value | Block period | Swap opportunity after blocking |
|---|---|---|
| block | Short; fallback is invisible while the font is missing. | Unlimited swap period. |
| swap | Extremely small; quick transition to visible fallback. | Unlimited swap period. |
| fallback | Extremely small; quick transition to visible fallback. | Short swap period. |
| optional | Extremely small; quick transition to visible fallback. | No swap period. |
- MDN : font-display
Consulted on 22 October 2026; phases describe display strategy without one fixed duration for every browser.
Test layout, zoom and states
Check a dense page, navigation, table and form with final and fallback fonts. Test narrow screens and zoom. Buttons, prices, names and errors should remain available when text takes more space.
Compare states before and after loading, including line breaks, height and primary-button movement. Capture specified conditions rather than judging an already-loaded desktop screen. Repeat languages that differ most from the initial design.
Maintain the typography decision
Keep origin, checked rights, files, tested languages and loading rules in the project documentation. Repeat representative examples before a brand or font change affects every screen.
Remove unused variants only after checking content and documents that may still request them. Deliver readable typography with tested fallbacks, suitable character coverage and a limited list of justified resources.
Primary documentation : MDN : font-display.
Check reading without a remote font

Proposed case: a translated heading works with its intended font but a button clips with the fallback. The loaded state hides the issue.
Block the font file locally and check characters, lines and actions. Keep tested languages and widths; claimed coverage must be checked against published text.
- Test the fallback font
- Check language characters
- Check narrow-screen actions
- Separate public and private responses
Configure HTTP caching without exposing private data
Reference documents
- MDN : font-display · Source consulted
- MDN : Web fonts
- Unicode : UAX #29: Text Segmentation · Source consulted
- TC39 : Intl.Segmenter · Source consulted
Content updated on
Documented reference points for this topic
| Reference | Value or syntax | Scope |
|---|---|---|
| W3C · HTML language | <html lang="fr"> | The default language is declared on html; local language changes are marked. |
| WCAG 2.2 · 1.4.4 | 200 % | Enlarged text retains content and functionality; exceptions cover captions and images of text. |
Dates indicate when references were consulted. These facts are neither a site audit nor an overall compliance statement.
