IntermediateLesson 13 of 306 min read

Typography in Depth: Pairing, Tracking and Line Height

Learn how to pair fonts, why fonts differ in width, what tracking and line height do, and how to choose them, with real measurements of three fonts.

In this lesson you will

  • Pair fonts by contrast with a link
  • Understand font width, tracking and kerning
  • Choose a line height for body and headings
  • Use weight and case with care

About 22 minutes

Same words, different feel

Anil is designing a notice for the library door. The words are fixed: ‘Quiet please. Reading in progress.’ He tries a heavy rounded font and it looks like a toy shop. He tries a thin elegant font and it looks like a wedding. He tries a plain sans-serif and it looks like a fire notice. The words never changed, but the feeling did. Type carries personality, and this lesson goes beyond ‘pick two fonts’ to look at how fonts are paired, how wide they run, how letters are spaced and how lines are spaced.

Reading the kinds of font

  • Serif fonts have small feet on the letters. They feel traditional, literary and trustworthy.
  • Sans-serif fonts have clean ends. They feel modern, friendly and clear on screens.
  • Display and script fonts are decorative. They suit a short title and fail in a paragraph.
  • Monospaced fonts give every letter the same width. They feel technical.

Pairing fonts

Pairing works through contrast with a link. Choose two fonts that are clearly different, such as a bold sans-serif for headings and a light one for body text, or a serif heading with a sans-serif body. Then link them with something shared, such as similar proportions or the same family in two weights. The safest pairing of all is one family in two or three weights, which is why many brand kits do exactly that. Avoid two fonts that are almost the same, because the difference looks like a mistake.

Fonts have different widths

Here is something templates hide from you: the same text takes different amounts of room in different fonts. The program below measures a headline set at 80 pixels in three fonts. The numbers are real measurements from the font files on the machine that ran it, so your own fonts may differ.

from PIL import ImageFont
import os

G = "/usr/share/fonts/truetype/google-fonts/"
D = "/usr/share/fonts/truetype/dejavu/"
def path(*c):
    return next(p for p in c if os.path.exists(p))

fonts = {
    "Poppins Bold":  path(G + "Poppins-Bold.ttf", D + "DejaVuSans-Bold.ttf"),
    "Poppins Light": path(G + "Poppins-Light.ttf", D + "DejaVuSans.ttf"),
    "DejaVu Serif":  path(D + "DejaVuSerif.ttf"),
}
headline = "Autumn Bake Sale"
print("headline width at 80 px:")
for name, f in fonts.items():
    print(f"  {name}: {ImageFont.truetype(f, 80).getlength(headline):.0f} px")

# tracking: extra space between letters, as a share of the font size
f80 = ImageFont.truetype(fonts["Poppins Bold"], 80)
base = f80.getlength(headline)
for pct in (0, 2, 5):
    extra = 80 * pct / 100 * (len(headline) - 1)
    print(f"tracking {pct}%: {base + extra:.0f} px")

# line height: how many lines of a paragraph fit in a 330 px tall box
text = ("Fresh bread, cakes and cookies baked by neighbours and sold to help "
        "the library buy new books for the children's corner this winter. "
        "Come early for the best choice and bring a bag.")
font = ImageFont.truetype(fonts["Poppins Light"], 40)
lines, line = [], ""
for w in text.split():
    t = (line + " " + w).strip()
    if font.getlength(t) <= 900:
        line = t
    else:
        lines.append(line); line = w
lines.append(line)
print()
print("paragraph lines at 40 px:", len(lines))
for lh in (1.0, 1.3, 1.6, 2.0):
    block = len(lines) * 40 * lh
    print(f"line height {lh}: {block:.0f} px tall, {'fits' if block <= 330 else 'too tall'}")
headline width at 80 px:
  Poppins Bold: 754 px
  Poppins Light: 716 px
  DejaVu Serif: 749 px
tracking 0%: 754 px
tracking 2%: 778 px
tracking 5%: 814 px

paragraph lines at 40 px: 5
line height 1.0: 200 px tall, fits
line height 1.3: 260 px tall, fits
line height 1.6: 320 px tall, fits
line height 2.0: 400 px tall, too tall

The same words, ‘Autumn Bake Sale’, measure 754 pixels in the bold font, 716 in the light one and 749 in the serif. The differences are modest here, only a few per cent, but with a long headline they decide whether it fits on one line or two. That is why swapping the font in a template can quietly break the layout: always re-check the fit afterwards, as lesson 4 showed.

Tracking: spacing between letters

Tracking is the even spacing added or removed between all the letters of a word or line. In the program, the plain headline is 754 pixels wide. Adding 5 per cent of the font size between each pair of letters makes it 814 pixels. Small positive tracking, roughly 2 to 5 per cent, helps capital letters and small text breathe. Negative tracking tightens large headlines. Both are subtle, and too much of either looks odd. Do not confuse tracking with kerning, which adjusts the space between one specific pair of letters, such as a capital A next to a capital V. Most good fonts handle kerning automatically.

Line height: spacing between lines

The second part of the program wraps a short paragraph at 40 pixels into 5 lines, and then works out how tall the block is at four line heights. Line height is the distance from one line to the next, shown as a multiple of the font size. At 1.0 the lines almost touch. At 1.3 to 1.6 the text is comfortable for body copy. The block grows from 200 pixels at line height 1.0 to 400 pixels at 2.0, and in the 330 pixel box we tested, 1.6 (320 pixels) still fits while 2.0 is too tall. This is the trade-off in a small space: generous spacing reads easily but takes room.

As a guide, use about 1.2 for large headlines, where the lines are short and loose spacing looks gappy, and about 1.4 to 1.6 for body text. For small text or text on a dark background, a little extra helps.

Weights, case and emphasis

  • Use two or three weights at most, such as bold, regular and light, to show importance.
  • Use capitals for short labels only, and add a little tracking when you do.
  • Use italics sparingly, for a title or a quotation, not for whole paragraphs.
  • Keep alignment consistent, left for reading and centre for short titles.
Common mistake: sizes by eye

Stretching text with the resize handles instead of changing the font size. Dragging the side of a text box changes its width, but dragging a corner may scale the letters in ways that break your size scale. Set sizes numerically so they match your system.

Fonts and plans

Some fonts need a paid plan, and uploaded fonts are subject to the font’s own licence. If a font looks missing when someone else opens your design, it may be unavailable to their account.

Take a headline from one of your designs. Try it in three fonts and write down the widths, or just note which fits on one line. Then set a short paragraph at line heights 1.2, 1.5 and 1.8, and decide which one you would read for a minute without tiring.

Practice for this lesson

Check what you learned

Five quick questions. Pick an answer and you will see straight away whether it is right and why.

What is a good way to pair two fonts?

  1. Two nearly identical fonts
  2. Clearly different, with something linking them
  3. Five display fonts
  4. Only scripts

Contrast with a link, such as one family in two weights, looks intentional.

What is tracking?

  1. Spacing between lines
  2. Font weight
  3. Text colour
  4. Even spacing between all letters

Tracking adds or removes space between all the letters of a line equally.

What is line height?

  1. The size of capitals
  2. The distance from one line to the next
  3. The height of the page
  4. A font name

Line height is the spacing between lines, usually shown as a multiple of font size.

Why can changing a template font break the layout?

  1. Fonts change page size
  2. Fonts change colours
  3. Fonts delete text
  4. Fonts have different widths

The same words can need more or less room in a different font, so re-check the fit.

A decent line height for body text is about:

  1. 1.4 to 1.6
  2. 0.5
  3. 3.0
  4. 10

Body text usually reads well at roughly 1.4 to 1.6 times the font size.

Summary

  • Pair fonts with clear contrast and one link, or use one family in several weights.
  • Fonts differ in width, so always re-check text fit after changing one.
  • Tracking spaces all letters, kerning adjusts pairs, and line height spaces lines.
  • Use about 1.2 for big headlines and 1.4 to 1.6 for body text.

Next lesson

Lesson 14 shows how to organise layouts with grids and a spacing scale.

Questions

What is the difference between tracking and kerning?

Tracking changes the space between all letters evenly. Kerning adjusts the space between one specific pair of letters.

How many fonts should I use?

Two at most, or one family in a few weights. More fonts make a design feel unplanned.

Why does my text look different on another computer?

The font may be missing or unavailable on that account or device. Using fonts from the tool itself, and checking on another screen, avoids surprises.

Progress is saved in this browser.