Newwebs Techs logo Newwebs TechsBuilding websites, explained for beginners
Performance

How to Load Web Fonts Faster on a Small Website

A small business site I looked at last month scored 94 on PageSpeed for desktop and 61 on mobile. The images were already compressed, the hosting was decent, and there was hardly any JavaScript.

Browser developer tools network panel filtered to font files beside a website heading rendered in a custom typeface

A small business site I looked at last month scored 94 on PageSpeed for desktop and 61 on mobile. The images were already compressed, the hosting was decent, and there was hardly any JavaScript. The culprit was fonts: four weights of one family and two weights of another, all loaded from a third-party service, adding up to about 410 KB before a single word appeared on a mid-range phone over 4G.

Web fonts are one of the easiest performance problems to create and one of the least noticed, because on a fast office connection everything looks fine. On a real phone, the visitor sees a blank space where your headline should be for a second or two, or watches the text jump when the custom font finally swaps in. Both cost you visitors, and both are fixable in an afternoon.

Why fonts slow a page down more than their size suggests

A font file is usually not huge. A single weight in WOFF2 format is often 20 to 40 KB. The problem is when and how the browser fetches it.

The browser does not know a page needs a font until it has downloaded the HTML, then the CSS, then parsed the CSS and found an element that uses it. Only then does it request the font file. If the font lives on another domain, the browser also has to look up that domain, open a connection, and negotiate encryption, which can add 100 to 300 ms on mobile networks before the first byte of the font arrives. That whole chain sits in the critical path for your text.

While this happens, browsers behave differently. Some hide the text completely for up to three seconds, waiting for the font. Others show a fallback font and then swap. Either way, if your headline is the largest element on the screen, your Largest Contentful Paint waits on the font, and the swap can push lines around enough to hurt your layout shift score. If you have seen strange jumps on page load, the guide to fixing cumulative layout shift explains how to trace them.

The changes that make the biggest difference

These are in rough order of impact for a typical small site. You do not need all of them, but the first three cover most of the gain.

  1. Cut the number of font files. Most sites need two weights at most, regular and bold. Italic can often be dropped, and a separate font for headings is a design choice that costs a full extra download. Going from six files to two is usually the single largest saving.
  2. Use WOFF2 only. Every current browser supports it, and it is typically 25 to 30 percent smaller than WOFF. The old TTF and EOT fallbacks in many font kits are dead weight.
  3. Self-host the files. Serving fonts from your own domain removes the extra DNS lookup and connection. Download the WOFF2 files, upload them to your site, and point your CSS at them.
  4. Add font-display: swap to each font-face rule. This tells the browser to show text in a fallback font right away and swap when the custom font arrives, so visitors never stare at blank space.
  5. Preload the one font used above the fold. A link tag with rel set to preload, as set to font, and the crossorigin attribute tells the browser to fetch that file early, before it has finished parsing CSS. Preload only one or two files, because preloading everything just competes for bandwidth.
  6. Subset the font. If your site is in English, you do not need Cyrillic, Greek, or Vietnamese characters. Tools like glyphhanger or the subsetting option in Font Squirrel's generator can cut a file from 80 KB to under 20 KB.

On the site I mentioned, steps one to four brought the font payload down to 58 KB and the mobile score up to 88. That took about two hours, most of it spent persuading the owner that the light italic weight on one testimonial was not worth 45 KB.

Variable fonts are not automatically faster

You will often read that variable fonts solve the performance problem, because one file contains every weight from thin to black. That is true only if you were going to use many weights anyway.

A variable font file is larger than any single static weight, often 80 to 150 KB for a full Latin family. If your site uses regular and bold, two static WOFF2 files at 25 KB each will beat a 110 KB variable file comfortably. The variable version wins once you need four or more weights, or if your design genuinely uses in-between values like a weight of 450.

So the decision is arithmetic, not fashion. Add up the sizes of the static files you actually use and compare them with the variable file. I have seen sites switch to variable fonts on advice from a blog post and get slower.

Stopping the jump when fonts swap

Once you use font-display: swap, text appears immediately in a fallback font such as Arial or Georgia. When the custom font loads, the text reflows because the two fonts have different widths and heights. On a long headline this can push a whole paragraph down.

The fix is to make the fallback match the custom font's dimensions. Modern browsers support size-adjust, ascent-override, and descent-override descriptors in a font-face rule. You create a second font-face that points at a local system font and scales it to match your web font. Tools such as Fontaine or one of the free online fallback font generators calculate the values for you. With a well-matched fallback, the swap becomes barely visible.

If that feels like too much, the simpler option is to pick a web font whose proportions are already close to a system font. Inter and Arial, for example, are near enough that the shift is small. This is worth weighing when you choose a typeface; the article on choosing fonts that stay readable covers the design side.

Checking your work

Open Chrome DevTools, go to the Network tab, filter by Font, and reload with cache disabled and throttling set to Fast 4G. Count the files and add up their sizes. A lean small site should load one to three font files totalling under 100 KB. Then run PageSpeed Insights again and check whether the LCP element is text, and whether it improved.

Also make sure the font files are served with long cache headers, a year is normal, so returning visitors never download them twice. If your host does not do this by default, the steps are in the guide to setting up browser caching.

The quickest change you can make this week is to open your stylesheet, list every font weight it loads, and remove the ones nothing on the site actually uses. On most sites I review, at least one is unused.

FAQ

Do web fonts slow down a website?

They can. Each font file has to be discovered and downloaded before styled text appears, and third-party font services add extra connection time on mobile.

Is it better to self-host Google Fonts?

Usually, yes. Self-hosting removes an extra domain lookup and connection, and lets you control caching and subsetting.

What does font-display swap do?

It shows text in a fallback font straight away and replaces it with the web font once it loads, so text is never invisible.

How many web fonts should a website use?

For most small sites, one family in two weights is enough. Every additional weight is another file to download.

FN
Felix Nkemelu

Felix covers website speed and hosting for beginners, turning technical topics into practical decisions.

More posts by Felix

More in Performance

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto