Choosing fonts for a website

One typeface is usually enough. How to judge one at reading size, how many weights to load, and what the licence and the server it comes from mean for you.

A line drawing of the same strokes rendered at three weights, on the SaneChoice navy

Most websites need one typeface, and very few need more than two. The choice that matters is made at 16 pixels, in a paragraph, on a phone, not in the big heading where most people judge a font.

This guide is about choosing: how to tell whether a typeface reads well, when a second one earns its place, how many weights to use, and the two questions people forget until later, which are the licence and where the files come from. Getting a font onto the page without a flash or a delay is covered separately, in fonts and the flash while they load.

Judge a typeface at the size people will read it#

Every font looks good at 60 pixels in a specimen. What you need to know is whether it still reads well as body text, so set a real paragraph in it at 16 to 18 pixels and read it on a phone. Browsers set body text at 16 pixels unless they're told otherwise, which makes that a sensible floor.

Look at the x-height first. The x-height is the height of a lowercase letter such as x, measured against the full height of the letters. Two typefaces at the same font size can look a size apart, because the font size measures the whole letter box rather than the small letters you mostly read. A tall x-height reads larger and stays clear on a small screen. A short one can look elegant in print and cramped on a phone.

The same font size, two different x-heightstall x-heightshort x-heightreads larger on a phonereads smaller at the same size
Font size measures the box, not the letters. Both are set at the same size and reach the same top line. The blue line marks where the lowercase letters stop, and that's the height your eye actually reads.

Check the letters that get confused. Type Il1 O0 rn m and see whether a capital I, a lowercase l and the number one can be told apart, and whether r and n run together into an m. It matters most for the things people copy down: prices, reference numbers, email addresses.

Use the regular weight for body text. Light and thin weights look refined in a design file on a bright monitor and turn into grey hairlines on a phone outdoors. Regular, numbered 400 in CSS, is the weight a typeface was drawn to be read in. The same goes for size: text on a phone has to be readable without zooming.

Give the lines room. Line spacing of about one and a half times the font size suits most body text, and lines of roughly 45 to 75 characters, the range typographers have recommended for a long time, stop the eye losing its place. Those are settings rather than part of the font, but a typeface that only looks right with unusual settings is telling you something.

One family is usually enough#

A good family with a regular, a bold and an italic can set your headings, body text, buttons and captions, and the page hangs together because it's all one design. Size and weight do the work of telling a heading from a paragraph.

A second typeface earns its place when it does a different job and looks clearly different. The rules of thumb that rarely go wrong:

Contrast them, don't match them. A serif for headings with a sans-serif for body text, or the other way round. Two sans-serifs that are nearly alike look like a mistake rather than a choice.

Give each one a job and keep it there. Headings in one, everything else in the other. A third font for the buttons, or for quotes, is where a page starts to look assembled from parts.

Let a superfamily do the matching. Some families come in serif and sans-serif versions drawn together, with the same proportions and x-height. IBM Plex, which has sans, serif and monospaced versions, is one. Pairing within a family like that takes the guesswork out.

Script and handwriting faces belong in a logo, if anywhere. Set as a paragraph, they slow everybody down.

Load the weights you use, and no more#

Each weight and style of a traditional font is its own file. Regular, italic, bold and bold italic is four downloads. A design that uses light, regular, medium, semibold and bold, each with an italic, hands every visitor ten. Most sites need two or three: regular and bold, plus italic if your writing uses it.

Variable fonts change the sum. A variable font holds a whole range of weights, and sometimes widths, in a single file. It's usually bigger than one weight and smaller than several, so it pays when you'd otherwise load three or more.

Don't ask for a weight you haven't loaded. If the CSS asks for bold and there's no bold file, the browser fakes one by thickening the regular, and it fakes italic by slanting it. The results look clumsy and vary between browsers, which is part of why fonts can look different in Firefox.

Consider the fonts already on the device#

The quickest font is one that doesn't download at all. A system font stack tells the browser to use the typeface the device's own screens use: San Francisco on Apple devices, Segoe UI on Windows, Roboto on most Android phones. One line does it:

font-family: system-ui, sans-serif;

There's nothing to load, nothing to license and nothing sent to anybody else's server, and each of those typefaces was designed to be read on that screen. The trade is control: the page looks slightly different on each kind of device, and it looks like the device rather than like you. For a business whose brand lives mostly in its logo, colours and photographs, a system font is a real choice, not a fallback. For a serif, Georgia comes installed on Windows and Apple devices and works the same way, with Android phones putting their own serif in its place.

For a business whose brand lives in its logo and photographs, a system font isn't a fallback. It's a real choice.

Read the licence before the site goes live#

A font is software, and showing it on a website is a use the licence has to allow.

Google Fonts are free to use, including commercially. Everything in the Google Fonts library is published under an open licence, most of it the SIL Open Font License, which lets you use a font on any site, host the files yourself and modify them. What it doesn't let you do is sell the font on its own.

Paid fonts are licensed by use. A desktop licence, the kind you buy to set a brochure, usually doesn't cover a website. Web licences are sold separately by the foundry that made the font, and they're often priced by page views or by the number of sites. Read what yours counts, because a site that grows can outgrow it.

Subscription fonts stop with the subscription. Adobe Fonts, which come with a Creative Cloud plan, are served only from Adobe's own servers, and Adobe's help pages say a site loses them if the subscription ends. So the subscription is safest in the name of the business that owns the site rather than its designer, and whoever pays for it needs to know the website depends on it.

Whichever you choose, make sure a paid licence is in the business's name rather than your designer's, and keep it with your domain and hosting records.

Host the font files yourself#

There are two ways to get a web font onto a page. You can link to a font service, such as Google Fonts or Adobe Fonts, so that each visitor's browser fetches the files from that company's servers. Or you can put the files on your own server with the rest of the site, which is called self-hosting.

Privacy is what settled it in Europe. When a page loads a font from Google's servers, the visitor's browser sends Google its IP address. Google's privacy notes for the Fonts service say as much, and add that it sets no cookies and doesn't use the data to build advertising profiles. In January 2022 a regional court in Munich ruled that a website had broken the GDPR by passing a visitor's IP address to Google this way without consent, and awarded the visitor €100 in damages, noting that the fonts could have been used without contacting Google at all. It's one German court's ruling, not a European rule, but a wave of claim letters to German website owners followed it, and self-hosting removes the question entirely.

The speed argument for a font service has gone. The old case for Google's servers was that a visitor had probably downloaded the same font on another site and would already have it. Browsers stopped sharing their cache between websites, Safari first and Chrome and Firefox by early 2021, so every site's fonts are downloaded fresh anyway. Self-hosted files come over the connection the page is already using, without a second server to contact.

Self-hosting is a short job. Download the font as WOFF2, the compressed format every current browser supports, keep only the weights you use, upload them with the site and point an @font-face rule at them. Google Fonts' licences allow it, a paid font needs a web licence that permits it, and Adobe Fonts doesn't offer it at all.

OptionFiles to downloadLicenceVisitor data sent elsewhere
System font stackNoneNone neededNo
Google Fonts, self-hostedThe weights you useOpen, freeNo
Google Fonts, from Google's serversThe weights you useOpen, freeYes, to Google
Paid font, self-hostedThe weights you useWeb licence from the foundryUsually not, though some licences need a counting script
Adobe FontsThe weights you useCreative Cloud planYes, to Adobe

In summary#

Choose a typeface by reading a paragraph of it at 16 pixels on a phone, looking for a generous x-height and a regular weight that stays dark. Use one family, or two that clearly differ, load two or three weights, and give the system font a fair look before any of them. Check the licence covers a website, and host the files yourself.

On the sites we design, the type is chosen in the clickable mockup, before anything is built, so you judge it in place rather than in a specimen. The website design page sets out how that works. If the text on your current site is hard going, it's one of the faults in where websites usually go wrong.

First published

Website design

Have your site built for you

from $1,025.99 per site

See plans