How many fonts and weights a page really needs
Fewer than you think. Most pages don't need very many fonts, and requesting a lot of them may make pages slow to load.1
There's no magic number in any of the sources used here, so this page gives you a way to count and cut instead.
Why each file costs something
A font file is a download. MDN advises providing as few web font files as possible, because keeping the number of files and formats to a minimum reduces the resources the browser needs to fetch.2
web.dev goes further: a font nobody requests is the quickest one to deliver.3
What counts as "one more font"
In most setups, each of these is a separate file:
- Another family. A heading font plus a body font is two families.
- Another weight. Regular and bold are two files of the same family.
- Another style. Italic is its own file too.
- Another script or subset. Some font providers serve separate files for different character sets, and Google Fonts does this by default.3
A font file holds a single style unless it's a variable font.3 Google's API gives you the regular version by default, and you add other weights and styles by asking for them.1 So every extra weight is a choice you made, not something that comes free.
How to count what your page loads
- Open your browser's developer tools and go to the Network tab.
- Filter the list to fonts.
- Reload the page and write down each file.
- Look at your CSS and mark which text really uses each one.
A font is downloaded only if styling on the page refers to it.3 So a file that loads but looks unused usually means a rule somewhere still points at it.
What to cut first
- Weights you never use. If bold only appears in two places, ask whether a different style would do.
- Italics you don't need. Keep them only if your text relies on them.
- A second family that looks like the first. Two near-identical fonts add weight and little else.
- Fonts for one short line. Ask whether the page really needs a whole file for it.
- Fonts that duplicate what the device already has. See [page:system-fonts-and-font-stacks].
Options that cut the count
- Use a system font for body text. Nothing to fetch.3 See [page:system-fonts-and-font-stacks] for the caveats on long paragraphs. Pair it with one web font for headings if you want a look of your own.
- Try a variable font. One file can replace several fixed-weight ones. Variable fonts contain many styles though, so a single file is typically larger than one non-variable font. They suit pages that really use a range of weights.3
- Trim the letters. Removing unused glyphs can significantly reduce the filesize of a font.3 Check the licence first, as [page:font-licences-in-plain-words] explains.
- Keep to one file type. Don't ship the same font in several formats if one will do.2 See [page:web-font-file-formats].
A sensible starting plan
- One family for the whole page, with a regular and a bold weight, is a small footprint to begin with. Add more only when a real need appears.
- Test on a slower connection, not only your own fast one.
- Revisit it now and then. Old designs leave unused font rules behind.
If a page still feels slow after trimming, look at [page:font-display-and-flash-of-text] and [page:self-hosting-or-font-service]. They cover where the files come from and how the browser treats them while they load.
Cited material
- Get Started with the Google Fonts API, Google for Developers
- Web fonts - Learn web development, MDN Web Docs (Mozilla)
- Best practices for fonts, web.dev (Google)
