Web Font Loading and How to Stop Text Jumping on Mobile
You chose a lovely typeface, set the sizes carefully, and the page looks right on your laptop. Then someone opens it on a train with a weak signal. For two seconds there is no text at all, just a white page with a logo.

You chose a lovely typeface, set the sizes carefully, and the page looks right on your laptop. Then someone opens it on a train with a weak signal. For two seconds there is no text at all, just a white page with a logo. Then the headings appear in Arial, and half a second later everything shifts as the real font arrives, pushing the button they were about to tap down by a line.
That jump is a font loading problem, not a typography problem, but it ruins the typography anyway. It is also one of the most common reasons a small site scores badly on layout shift in Google's Core Web Vitals. Most of it can be fixed in an afternoon without giving up the typeface you picked.
Why the text disappears and then jumps
A web font is a file the browser has to download before it can draw text in that font. While it waits, the browser has two choices. It can hide the text until the file arrives, which is called a flash of invisible text. Or it can draw the text in a fallback system font and swap later, a flash of unstyled text.
Chrome, Firefox and Safari default to hiding text for up to three seconds, then showing the fallback. On a slow connection, three seconds of blank page is long enough for people to leave.
The jump happens at the swap. Your fallback, say Arial, and your web font, say Inter or Lora, have different widths and heights. A paragraph that wrapped onto six lines in Arial may need seven lines in Lora. Everything below it moves. In my tests on a blog layout with Merriweather body text, the swap pushed the first call to action down by 38 pixels on a 390 pixel wide phone screen.
So there are really two problems: how long the wait is, and how different the before and after look. Fix both and the swap becomes almost invisible.
The fixes, in the order I apply them
- Load fewer font files. Count them. A family with regular, italic, medium, semibold and bold in two styles is ten files. Most sites need three: regular, italic and bold. A variable font can replace all weights with one or two files, usually around 40 to 90 KB in WOFF2.
- Serve WOFF2 only. Every browser in real use supports it. Drop the old TTF, EOT and SVG formats from your @font-face rules; they only add bytes and confusion.
- Subset the font. If your site is in English, you do not need Cyrillic, Greek and Vietnamese glyphs. Subsetting to Latin often cuts a file from about 120 KB to under 30 KB. Google Fonts does this automatically through its unicode-range splits; for self hosted fonts, tools like glyphhanger or fonttools pyftsubset do it.
- Set font-display: swap on body text. Text shows immediately in the fallback and swaps when ready. For a large decorative display face used only in one heading, font-display: optional can be better: if the font is not ready within about 100 milliseconds, the browser keeps the fallback for that page view.
- Preload the one file that matters most. Usually the regular weight of your body font. Add a link rel="preload" with as="font", type="font/woff2" and the crossorigin attribute, even for your own domain, or the browser downloads it twice. Preload one or two files, never all of them.
- Match the fallback to the web font. This is the step that removes the jump, and it gets its own section below.
Self host where you can. Fonts from Google Fonts used to benefit from a shared cache across sites, but browsers stopped sharing caches between domains around 2020. Serving the files from your own domain saves a connection to another server, often 100 to 300 milliseconds on mobile.
Swap alone does not fix the jump
A lot of guides end at "add font-display: swap" and call the problem solved. It solves the invisible text, and that matters. But on its own it can make layout shift worse, because now the page always renders in the fallback first and then reflows.
The real fix is to make the fallback the same size as the web font. CSS has descriptors for this inside @font-face: size-adjust, ascent-override, descent-override and line-gap-override. You define a fallback face that points to a local system font and scales it to match.
For example, for Inter body text with Arial as the fallback, a size-adjust of about 107 percent brings the widths close enough that paragraphs wrap on the same words. Then your font-family stack lists Inter first, the adjusted fallback second, then sans-serif.
You do not have to calculate these by hand. Free online fallback font generators, or the font metric override feature built into Next.js and the Fontaine plugin for other frameworks, read the metrics from the font file and output the numbers. On the Merriweather layout above, adding matched fallback values took the shift from 38 pixels to 3.
It works less well for strongly characterful faces. A condensed display font or a script face has no system font that resembles it, and size-adjust can only match width and height, not shape. For those, font-display: optional and a reserved height for the heading are the honest answer.
Checking your own site
Open Chrome DevTools, go to the Network panel, set throttling to Slow 4G and filter by Font. Reload. You now see every font file, its size and when it finished. If you see more than four files, or any file above 100 KB, start there.
Then open the Performance panel and record a reload. Layout shifts show up as red markers in the Experience track. Click one and DevTools highlights the elements that moved. If they are text blocks that moved at the same moment a font file finished, you have found your culprit.
PageSpeed Insights gives a Cumulative Layout Shift number. Below 0.1 counts as good. Font swaps alone can add 0.05 to 0.15 on a text heavy page, enough to tip a passing score into failing.
Typography choices interact with this more than people expect. Very long lines make reflow more visible because a small width change rewraps more words, one more reason to keep the measure in check as described in how line length decides whether people keep reading. And every extra family adds files, which is a practical argument for the restraint in pairing two typefaces without a clash rather than three.
One thing to do this week: count the font files your homepage loads and cut that number in half. It is the change with the biggest effect for the least effort, and you will rarely notice the missing weights.
FAQ
Should I use font-display swap or optional?
Use swap for body text so it always appears in your chosen font eventually. Use optional for decorative fonts where the fallback is acceptable on a slow first visit.
Are Google Fonts bad for performance?
Not bad, but self hosting is usually faster now that browsers no longer share font caches across sites. The files are free to download and host.
How many web fonts is too many?
More than four files on a page is a sign to cut. Two families and three weights cover nearly every content site.
Do system fonts avoid the problem entirely?
Yes. A system font stack loads instantly and never shifts. The trade is less control over the look across devices.
More in Web Design
Web Design
Form Error Message Design That Helps People Fix It
I watched a friend try to book a vaccination appointment on a council website last winter.
Web Design
Sticky Header Design and How Much Space to Give It
Open a lot of small business sites on a phone and you find the same thing.
Web Design
Link Styling on the Web and Why Underlines Still Win
A studio I helped out last spring had a beautiful article page and a support inbox full of the same question: where do I click...