Check 27.06 · Development and accessibility by language

Check fonts for each language

Check that your fonts contain every character of each language, load the right subset and define per-language fallback fonts in CSS.

Priority
Important
Difficulty
Intermediate
Estimated time
2 to 6 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A web font only contains part of the Unicode characters. One that covers French perfectly may lack the Polish ł, the Romanian ș, Cyrillic or Arabic. The browser then has to fetch each missing character from a fallback font, which produces words drawn in two fonts, or empty boxes when no font fits. The task is to check, for each published language, that the font covers every character used, that the right subset is loaded, and that a suitable fallback font stack is defined. Once it is done, each version is displayed in consistent typography, with no needless downloads.

Why it matters

For each character, the browser goes through the font-family list in order and takes the first font that contains the glyph. If your brand font has no “ł”, the browser borrows it from a system font: the word “Łódź” mixes two letter designs. If no font contains it, the visitor sees an empty box (“tofu”).

Real cases are more common than you might think:

  • Central European Latin-script languages: Polish, Czech, Romanian, Turkish, Croatian and Hungarian use letters missing from the basic “latin” subset of many fonts.
  • French typography: the narrow no-break space (U+202F) before “; ! ?” and inside “« »”, the “œ” and accented capitals are missing from some fonts.
  • Vietnamese: letters with double diacritics, only available in the “vietnamese” subset.
  • Cyrillic, Greek, Arabic, Hebrew, Thai, Devanagari: entire scripts missing from Latin fonts.
  • Chinese, Japanese, Korean: thousands of glyphs, files of several megabytes, and shapes that differ by language for the same Unicode character. The lang attribute lets the browser and the font choose the Japanese or Chinese shapes.

Performance is the other issue. Loading every subset on every page weighs down the French version; a poorly split CJK font can on its own degrade the display of the Japanese version and cause layout shifts when it replaces the fallback font.

What it improves

  • Readability and brand image Consistent typography in every language, with no borrowed glyphs or empty boxes.
  • Performance Only the useful subsets are downloaded, which benefits LCP (Largest Contentful Paint).
  • Visual stability Close fallback fonts, and therefore fewer layout shifts (CLS, Cumulative Layout Shift) during loading.
  • Correct CJK rendering thanks to the combination of font and lang attribute.
  • Rankings No direct effect; the effect comes through the experience and Core Web Vitals.

How to check

Characters used by a page. In the browser console, on one page in each language:

[...new Set(document.body.innerText)]
  .filter((c) => c.codePointAt(0) > 127)
  .sort()
  .join(' ')

You get the list of the page's non-ASCII characters, for example É à â ç è é ê ë î ï ô ù û œ « » for French.

Font actually used. In Chrome DevTools, Elements tab, select a paragraph, then the Computed tab: the “Rendered Fonts” section, at the bottom, shows how many glyphs each font drew. Expected: a single line, your web font. A second line (“Arial — 3 glyphs”) reveals missing characters. Firefox shows the same information in the inspector's Fonts panel.

Coverage of a font file. Drag the .woff2 file into Wakamai Fondue: it lists the supported characters and languages. On a font's Google Fonts page, the languages section also shows the scripts covered.

Subsets loaded. Network tab, Font filter, reload one page in each language. Expected: the French page loads the Latin subset, the Russian page the Cyrillic subset, and no page loads files it does not need.

Visual test. Prepare a test sentence for each language with its tricky characters and display it in bold, italic and capitals:

Language Test sentence
French « Œuvre ÉTÉ — À bientôt ; Noël ! »
Polish Zażółć gęślą jaźń, ŁÓDŹ
Romanian Știință și țară (ș and ț with a comma below)
Turkish İstanbul, ılık, ĞŞÇ
Vietnamese Tiếng Việt, người
German Straße, Größe, capital ẞ

How to implement

Step 1 — Build the language and script matrix

List each published language, its script and the matching Google Fonts subset. This is the basis for every decision that follows:

Language Script Subsets needed Brand font covers it? Decision
French, English, German Latin latin Yes Brand font
Polish, Czech, Romanian, Turkish Extended Latin latin, latin-ext Yes (checked with the test sentence) Brand font
Russian, Ukrainian Cyrillic cyrillic, cyrillic-ext No Font from the same family with Cyrillic
Arabic Arabic arabic No Dedicated Arabic font
Japanese Japanese Split into slices No System font or split CJK font

Step 2 — Choose a font for each script

If your brand font does not cover a script, choose a companion font with similar proportions. Google's Noto families cover most scripts and come in dedicated versions (Noto Sans Arabic, Noto Sans JP, Noto Sans Hebrew). For Chinese, Japanese and Korean, system fonts (Hiragino, Yu Gothic, Microsoft YaHei, PingFang, Malgun Gothic) avoid any download.

Step 3 — Declare font stacks per language

The :lang() selector applies a different stack depending on the lang attribute of the page or passage:

:root {
  --text-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root:lang(ar) {
  --text-font: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

:root:lang(ja) {
  --text-font: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}

:root:lang(zh) {
  --text-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

:lang(ar) {
  line-height: 1.8;
}

This approach assumes a correct lang attribute on each page, see set html lang on each page (opens in a new tab).

Step 4 — Load only the useful subsets

The unicode-range descriptor of @font-face tells the browser which characters each file contains: it only downloads a file if the page uses one of those characters.

@font-face {
  font-family: "Brand";
  src: url("/fonts/brand-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: "Brand";
  src: url("/fonts/brand-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

The ranges above are examples: take those from your font's Google Fonts CSS (open the CSS URL in the browser: each block is commented /* latin */, /* cyrillic */…) or those of your file.

To split a font you hold a license for yourself, use fontTools' pyftsubset:

pip install fonttools brotli
pyftsubset Brand-Regular.ttf --unicodes="U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122" --flavor=woff2 --output-file=brand-latin.woff2

Check the license: some commercial fonts forbid modifying them or hosting subsets. font-display settings and the WOFF2 format are covered in detail in optimize fonts (WOFF2, font-display) (opens in a new tab).

Warning: only preload (rel="preload") the subset for the page's language. Preloading Cyrillic on every page forces its download even in French.

Step 5 — Apply it in your environment

Google Fonts via a CSS link: the API already serves each font split by unicode-range. All you need is to request a family that supports the scripts you want, with &display=swap. For a logo or a heading with fixed text, the text= parameter reduces the file to the requested characters only.

WordPress: check where the fonts come from (theme, page builder, plugin). Block themes manage fonts in Appearance > Editor > Styles > Typography. If you host Google Fonts locally with OMGF, check which subsets are kept: removing cyrillic on a site that publishes in Russian creates fallback glyphs. With Polylang or WPML, the :lang() selector above goes into the child theme's additional CSS.

Shopify: the fonts chosen in Theme settings > Typography come from Shopify's font library, whose coverage varies from font to font. Test each language's sentence in the theme preview with that language active; if a script is missing, choose a system font or another family for that language with :lang() CSS in assets/.

Next.js: next/font/google downloads fonts at build time and hosts them with the site. Specify the subsets to preload:

import { Inter, Noto_Sans_Arabic } from 'next/font/google'

const inter = Inter({ subsets: ['latin', 'latin-ext', 'cyrillic'], display: 'swap', variable: '--font-inter' })
const arabic = Noto_Sans_Arabic({ subsets: ['arabic'], display: 'swap', variable: '--font-arabic', preload: false })

Apply the Arabic variable in app/[lang]/layout.tsx only when lang is ar. A font called in a layout is only preloaded on the routes covered by that layout.

Laravel, Vite, Astro: install fonts with Fontsource, which provides files split by subset with unicode-range, and import the family's stylesheet in the CSS entry point.

Step 6 — Check whenever a language is added

Add each language's test sentence to your acceptance tests, and redo the “Rendered Fonts” check on one page per language after any font or theme change.

Common mistakes

  • Latin subset only for a Central European language: ł, ș or ğ are borrowed from a system font.
  • Every subset preloaded everywhere: the French version downloads Cyrillic and Greek.
  • Full CJK font in a single file: several megabytes to load before the text is displayed.
  • Missing accented capitals: “ETE” instead of “ÉTÉ” because the font or the design avoids them.
  • A single fallback stack for every script: the system font chosen for Arabic or Japanese varies from one device to another.
  • Wrong lang attribute: the :lang() selector does not apply, and Chinese shapes are displayed on the Japanese version.
  • Subset modified without checking the font's license.

Frequently asked questions

Why are some letters displayed in a different font?

Your web font does not contain these characters, and the browser borrows them from the next font in the font-family list, often a system font. This is common for Polish, Romanian, Turkish or the French narrow no-break space. Check in Chrome DevTools, in the Rendered Fonts section of the Computed tab, then load the latin-ext subset or choose a font that covers the language.

Should the Cyrillic subset be loaded on every page?

No. Declare each subset in an @font-face block with its unicode-range: the browser only downloads the Cyrillic file on pages that contain Cyrillic characters. Just avoid preloading it everywhere with rel="preload", which would force its download on the French version. Google Fonts and Fontsource already apply this splitting; with next/font, limit the preloaded subsets to the ones you use.

Which font should you use for Japanese or Chinese?

System fonts are often the best choice: Hiragino or Yu Gothic for Japanese, PingFang or Microsoft YaHei for Simplified Chinese. They require no download. If a web font is essential, use a font split into slices, such as those served by Google Fonts, and declare an exact lang attribute, because the same Unicode character is drawn differently in Chinese and in Japanese.

Do fonts have an effect on SEO?

Not directly: the choice of font is not a ranking factor. Fonts affect Core Web Vitals, which are one signal among others: a file that is too heavy delays text display and LCP, and a font swap during loading causes shifts counted in CLS. On a multilingual site, measure these effects separately for each language version.

Resources

Updated on

Topic checklist (PDF)

And now?

In the “Development and accessibility by language” topic

  1. Set html lang on each page
  2. Mark passages in another language
  3. Use UTF-8
  4. Handle accents and non-Latin scripts
  5. Handle dir=rtl if needed
  6. Check fonts for each language
  7. Test for text overflow
  8. Test performance for each version
  9. Test SSR/SSG for all languages
  10. Test multilingual dynamic routes
  11. Check per-language cache handling
  12. Check the CDN and language variants
  13. Serve the right content at the requested URL
  14. Test without cookies
  15. Test without Accept-Language
  16. Test keyboard navigation of the language switcher