Custom fonts give a brand personality, but each weight and style is another file to download. Poorly loaded fonts delay text, slow LCP and can cause layout shift when they swap in. The good news is that fonts can be loaded efficiently with a few simple techniques. These are the fixes I apply on client sites.
Why fonts affect speed
Browsers need the font file before they can display text in that font. If the font is large, comes from another server or is discovered late, text may be invisible or shown in a fallback font until it arrives. When the font finally loads, text can change size and shift layout.
Each weight, such as regular, medium, bold and italic, is usually a separate file. Sites often load six or more font files, many of which are barely used. Reducing and optimising them improves LCP and CLS.
Use fewer fonts and weights
Most sites need one or two font families and three or four weights in total. Audit which weights are actually used in your design. Remove unused weights from theme settings, page builders and plugins.
Consider using a system font stack for body text, which loads instantly because fonts are already on the visitor’s device. Many modern designs pair a custom heading font with system fonts for body text.
- Fewer weightsThree or four total
- Self-hostedWOFF2 format
- font-display swapNo invisible text
- Preload one or twoAbove-the-fold fonts
- SubsetOnly needed characters
- Matched fallbackLess layout shift
Self-host your fonts
Loading fonts from Google Fonts or another service requires connecting to their servers, which adds time. Self-hosting fonts on your own domain removes that extra connection and gives you more control over caching. It can also help with privacy compliance in some regions.
Download fonts in WOFF2 format, the most efficient format supported by all modern browsers. Many performance plugins and themes offer a setting to host Google Fonts locally automatically.
Use font-display swap
The font-display property controls what happens while a font loads. Swap shows text immediately in a fallback font, then swaps to the web font when ready. This prevents invisible text and helps LCP when the main element is text.
Optional is another value that only uses the web font if it loads very quickly, avoiding layout shift completely but sometimes showing the fallback font. Choose swap for most sites, and optional where stability matters more than the exact font.
Preload the critical font
Preloading tells the browser to download a font early, before it discovers it in the CSS. Preload only the one or two fonts used above the fold, such as the main heading and body weights. Preloading too many files competes with more important resources.
Add a link tag with rel preload, as font, type font/woff2 and the crossorigin attribute in the page head. Many performance plugins can do this for you.
Subset fonts
Font files often include characters for many languages. Subsetting removes characters you do not need, such as Cyrillic or Vietnamese if your site is only in English, which can reduce file size significantly.
Google Fonts serves subsets automatically based on the text. For self-hosted fonts, use a subsetting tool or download only the subsets you need. Keep characters for any languages your site uses.
Variable fonts
Variable fonts contain multiple weights and styles in one file. If you use several weights of the same family, one variable font file can be smaller than several separate files. Many popular Google Fonts are available as variable fonts.
Check the file size: a variable font with many axes can be larger than two static weights. Use it when you need three or more weights of the same family.
Reduce layout shift from fonts
When a web font replaces a fallback with different proportions, text reflows and content shifts. Choose a fallback font with similar metrics, and use CSS descriptors such as size-adjust, ascent-override and descent-override to match the fallback more closely.
Some tools and frameworks generate these fallback settings automatically. This makes font swapping almost invisible and helps CLS. See fixing layout shift.
Icon fonts
Icon fonts like older Font Awesome versions load hundreds of icons when you use a handful. They can also cause layout shift and accessibility issues. Replace them with inline SVG icons or a subset containing only the icons you use.
Page builders often load icon libraries on every page. Check settings to disable unused icon libraries or load them only where needed.
Fonts in page builders and themes
Page builders and themes often load fonts automatically. Elementor can load Google Fonts for every font chosen in its settings, and some themes load several families by default. Check each source in your site’s settings, disable the ones you do not use and choose a single place to manage fonts.
Many performance plugins and recent versions of Elementor can host Google Fonts locally. After switching, check the Network tab to confirm no requests still go to fonts.googleapis.com, and clear all caches. It is common to find fonts loaded twice, once locally and once from Google, after an incomplete change.
Check the results
After changes, test pages in PageSpeed Insights and check that text appears quickly, fonts load in WOFF2 and no unnecessary font files load. Look at the Network tab in DevTools to count font requests.
If you would like help optimising fonts as part of a speed project, it is included in my speed optimization service. For other loading fixes, see render-blocking resources and preload, preconnect and prefetch.
Key takeaways
- Use one or two families and only the weights your design needs.
- Self-host fonts in WOFF2 and use font-display swap.
- Preload only the fonts used above the fold.
- Match fallback font metrics to reduce layout shift.
Frequently asked questions
Should I preload every font?
No. Preloading too many files competes with more important resources.
Is Google Fonts slow?
It adds a connection to Google's servers. Self-hosting is usually faster and gives more control.
What is WOFF2?
The most compressed web font format, supported by all modern browsers.
Do system fonts look unprofessional?
Not necessarily. Modern system fonts are clean and readable, and load instantly.
Can fonts affect Core Web Vitals?
Yes. They can delay LCP when text is the main element and cause layout shift when swapping.
