Sub topic 2
What to look for when choosing a typeface
This chapter assumes you know basic HTML and CSS, including the font-family property, and that you can open your browser's developer tools. It builds on the typeface categories (serif, sans-serif, monospace, display) and gives you criteria for picking a font before you load it from Google Fonts or Adobe Fonts.
Start with the job the text does
A typeface is a design choice, and it has to serve the text it sets. Ask what the text is for before you look at any catalog.
- Body text is read in long runs, often at 16 px to 18 px. It needs clear letterforms and steady spacing.
- Headings are short and large. They can carry more personality.
- Interface text, such as buttons, labels, and form fields, is small and must stay readable at 12 px to 14 px.
- Code and tabular numbers need predictable widths, so a monospace face or a font with tabular figures fits.
A display face can look great in a 48 px heading and fall apart in a paragraph. Decide the role first, then judge candidates in that role.
The four criteria
The table summarizes what to check. The sections after it explain each one.
| Criterion | Question to ask | How to test it |
|---|---|---|
| Legibility | Can I tell similar characters apart at small sizes? | Set real text at your smallest size |
| Tone | Does the personality match the brand and content? | Compare against two or three alternatives |
| Language support | Does it include every character my content needs? | Check the supported scripts and test sample text |
| Weights and styles | Are the weights I need available? | List the weights and italics your design uses |
Legibility
Look at letters that are easy to confuse: capital I, lowercase l, and the digit 1; O and 0; rn and m. A good text face makes these distinct. Check the x-height, which is the height of lowercase letters such as x. A larger x-height usually reads better at small sizes. Also check spacing. Tight letter spacing at 14 px can make words blur together.
Tone
Serif faces often feel traditional or editorial. Sans-serif faces often feel neutral and modern. These are tendencies, not rules. Two sans-serif fonts can feel very different, one geometric and friendly, the other plain and corporate. Judge by seeing your own text set in the font, not by the category name.
Language support
A font may cover only basic Latin letters. If your site has names with accents (é, ñ, ø), Cyrillic, Greek, Vietnamese, or other scripts, check that the font includes them. Missing characters do not disappear. The browser substitutes glyphs from the next font in your stack, and the result looks inconsistent. Google Fonts lists supported scripts on each family page, and Adobe Fonts shows language support in its font details.
Weights and styles
Count what your design uses. A common set is regular (400), bold (700), and italic. Some families offer only one or two weights. If your design needs light, regular, and semibold, a family with only regular and bold forces the browser to guess. When a requested weight is missing, the browser picks the nearest one. When a style is missing, it may synthesize a fake bold or italic by slanting or thickening the glyphs. Synthesized styles are usually uneven and are a common sign of a poorly loaded font.
A family with many weights also costs more to load, which a later chapter covers. Choose the weights you need and no more.
Compare candidates in the browser
Do not decide from a specimen image alone. Test on a real page with real content.
- Write a test page with a heading, a paragraph, a button, and a number table.
- Apply each candidate in turn.
- View it at your smallest and largest sizes, and on a phone as well as a desktop.
This stylesheet makes swapping candidates quick. You change the one custom property:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Font test</title>
<style>
:root {
--test-font: Georgia, serif;
}
body {
font-family: var(--test-font);
font-size: 16px;
line-height: 1.5;
max-width: 40rem;
margin: 2rem auto;
}
h1 { font-size: 2.5rem; }
.small { font-size: 0.75rem; }
</style>
</head>
<body>
<h1>Il1 O0 rn m</h1>
<p>Réseau de café à Zürich: 1,234.56 units shipped.</p>
<p class="small">Small interface text, 12 px: Il1 O0 rn m</p>
</body>
</html>Change --test-font to Verdana, sans-serif or "Courier New", monospace and reload. The first heading shows whether similar characters stay distinct. The accented line shows whether the font handles non-ASCII text. These checks use fonts already on your computer, and the same test applies once you load a web font.
How the criteria connect
Your choice moves from the role of the text, through the four criteria, to a short list you test.
Exercise
Your site shows customer names such as "Łukasz" and "Nguyễn", and your design uses regular, semibold (600), and italic. Name two things you check on a candidate font before choosing it.
Show answer
Check language support, to confirm the font includes the characters in those names (Latin Extended and Vietnamese). Check weights and styles, to confirm it offers 400, 600, and a true italic, so the browser does not synthesize a fake style or substitute glyphs from a fallback font.