What a font knows about its own letters

Four samples set twice each, once plain and once with a single setting turned on: joined letters, small capitals, figures that hang below the line, and pairs moved closer together.

A font file holds more than one drawing per letter. It says which letters look better drawn joined, which figures are meant to rise and fall around the small letters, which letters have a small capital of their own, and how close each pair of drawings should stand. This page shows all four, each sample set twice with only that one setting between the two lines.

Nothing is turned on unless it is asked for, so a document made before any of this existed comes out exactly as it did. What a setting does is whatever the font put there, and a font that offers nothing for it draws what it always drew. The two closing lines are read off the font itself — how many drawings the joined letters save, and how many points closer the last line is set.

What this example shows

  • Joined letters, small capitals and hanging figures, each on ask.
  • Pairs of letters moved as close as the font asks for.
  • Text measured with the settings on: a line is as wide as it looks.

The code, in full

The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.

The document itself

The same document is written in each of these languages. Open the one you want to look at.

Open the document in English Open the document in French

Read the Rust source Read the Python source

First page of What a font knows about its own letters

What this document weighs

This document weighs 18,181 bytes.

The team wrote this example after measuring the documents above, so there is no earlier figure to set beside it. See every document measured.

Examples near this one

Soft hyphens and no-break spaces

A justified column set twice: the long words breaking at their soft hyphens with a hyphen shown, or left whole, and a figure a no-break space keeps together.

Break points after a slash or a hyphen

A justified column set twice: file paths and compounds running past the edge with no break points, then wrapping where a break after a slash or a hyphen is allowed.

A font behind the font

One line of statuses set twice: in a house font alone, where the marks it has no glyph for come out as empty boxes, then with a second font behind it that draws them.

Text poured into columns

One long passage poured into three columns, each fitting the lines its height allows and handing the rest to the next.

Every example, by subject