Pairing 29 of 32

Fira Code and Fira Sans

Fira Code for headings, labels and code, Fira Sans for prose. Both come from the Fira family, so code samples sit inside the text without a change of voice.

Open in pairer

Field notes · No. 14

The quiet work of choosing two typefaces

A heading face sets the tone in a few words. A body face has to be read for twenty minutes without anyone noticing it.

Most pages need two fonts at most. One carries the headlines and gets to have opinions; the other carries the paragraphs and should have almost none. When both try to be interesting, the reader feels the argument before they read a word.

Match the hidden measurements

The height of the lowercase x decides how big a face looks at a given size. Pick two with similar x-heights and a 40px heading over 18px body text keeps its rhythm, with no letter looking shrunk or swollen beside its neighbor.

Contrast the genre, agree on the skeleton.

A serif and a sans can still share their bones. Garamond and the humanist sans serifs both come from the broad-nib pen; Bodoni and Futura both come from the compass. Pair from the same side and the curves rhyme.

0123456789 · $48.50 · 3:45 PM · 1,280 px

Why it works

88ExcellentSuperfamily: one skeleton, drawn twice
  • +One family: Fira Code and Fira Sans share proportions and x-height, and differ only in monospace against sans serif.
  • +A monospaced heading reads as code or data, a clear signal for technical products.

A serif and a sans drawn together share proportions, x-height and spacing, and differ only in serifs. It is the safest pairing there is, because the designer has already done the matching.

The fonts

Fira Code
Role
Headings, set at 600
Classification
Monospace
Model
Fira Mono with programming ligatures
Designer
Nikita Prokopov
x-height
0.525 em
Weights
300 to 700, variable
License
SIL Open Font License 1.1
Fira Sans
Role
Body, set at 400
Classification
Humanist
Model
The FF Meta school of humanist sans
Designer
Erik Spiekermann, Carrois
x-height
0.527 em
Weights
400, 600
License
SIL Open Font License 1.1

CSS

Self-hosted with Fontsource
/* npm i @fontsource-variable/fira-code @fontsource/fira-sans */
@import "@fontsource-variable/fira-code";
@import "@fontsource/fira-sans/400.css";
@import "@fontsource/fira-sans/600.css";

:root {
  --font-heading: "Fira Code Variable", ui-monospace, Menlo, Consolas, monospace;
  --font-body: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body { font-family: var(--font-body); font-weight: 400; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; }