Websites

Web fonts and loading time: fast without layout shifts

A beautiful corporate typeface is part of the brand. Embedded without a check, it often weighs more than all the images on a page and makes text jump while loading. A few changes make it light.

Airnite Editorial Team27 November 2026 · 3 min
Published
Reading time
3 min
Author
Airnite Editorial Team

In short

  • A font reduced to the characters actually used is often only a fifth of the original size.
  • font-display and a matching fallback font prevent invisible text and layout shifts.
  • With unicode-range, each language loads only the characters it really needs.

What it is about

When examining a website’s loading time, most people look at images first. Yet surprisingly often it is the fonts. A modern variable font with all weights and character sets easily weighs several hundred kilobytes, and it is needed on every page before the text can even appear. In one project, the corporate font was by far the largest file on the home page.

There is a second problem as well: if the font loads late, the browser shows the text in a fallback font first, or not at all. When it then swaps, lines and paragraphs jump. Google measures these layout shifts as Cumulative Layout Shift, and they noticeably disturb readers.

How it works

The biggest lever is subsetting. A font often contains thousands of characters for dozens of languages. An English or German website only needs the Latin alphabet with accents and punctuation. When the font is reduced to that and delivered as WOFF2, it typically shrinks to a fifth. The original file stays archived in the project, together with the licence, which for open fonts usually explicitly allows such modification.

The second lever is loading behaviour. font-display defines what happens while the font is missing. The value optional only uses the corporate font if it arrives very quickly; otherwise the fallback remains for that visit, without a later swap. To keep the difference barely noticeable, a fallback font with adjusted metrics is defined. For further languages, unicode-range ensures that Cyrillic or Arabic character sets, for example, are only loaded when such characters actually appear on the page.

Where it goes wrong

A typical mistake is invisible demand. In a multilingual project, even German pages suddenly loaded the Cyrillic and the Arabic font. The cause was a collapsed language menu: the language names in their original scripts were invisible, but the browser still laid them out. Only when the closed menu was really taken out of the layout did the extra weight disappear.

A second mistake is fonts from third-party servers. They cost extra connections, fall under data protection and have to be allowed in the Content Security Policy. Self-hosted fonts are faster and easier to secure.

How to proceed

List all font files your pages actually load, with their size. Reduce each font to the character sets you need and deliver it as WOFF2 from your own server. Choose font-display deliberately and define a metric-compatible fallback font. Load other writing systems only via unicode-range. And after every design change, check again which fonts are really loaded, because new elements often bring new characters unnoticed.

Read more: Images and load time: fast websites despite large photos, Measuring PageSpeed properly: lab data, field data, fluctuations and Building a multilingual website: addresses, translation, text direction.

How Airnite helps

We analyse which fonts your website loads, reduce them to what is necessary and ensure a calm page build without layout shifts. Your look stays the same, while your loading time and your values in Google improve.

Checklist

Sources

Every fact in this article is based on the following publications. Primary sources are marked.

  1. web.dev (Google)Best practices for fontsVendorPrimary source
  2. MDN Web Docsfont-displayVendorPrimary source
  3. MDN Web Docsunicode-rangeVendor

Matching services

Read on

Current incidents and warnings are covered in the Zero Day magazine. Go to the magazine

Want to put this into practice in your company?

We assess your situation and tell you clearly what to do. For businesses, in confidence.

Talk to an expert now