Google Sans Code + Roboto Serif
Font pairing: Google Sans Code for headings, Roboto Serif for body text.
The quick brown fox jumps over the lazy dog
Good typography is invisible until it is missing. Pair a characterful headline with a calm, readable text face, keep lines between 45 and 75 characters, and give every paragraph room to breathe.
- Monospaced headings over serif
- Comfortable body text
- Similar x-height
- Both open source
Why Google Sans Code and Roboto Serif work
- Monospaced headings over serif: a technical accent.
- Roboto Serif has regular, italic and bold styles and a generous x-height: comfortable at 16 px.
- Matching x-heights (52% and 52% of the font size), so they mix evenly on one line.
- Both open source: free to modify, share, self-host and subset, including for commercial use.
Google Sans Code and Roboto Serif compared
| Detail | Google Sans CodeHeadings | Roboto SerifText |
|---|---|---|
| Style | Monospace | Rational serif |
| Stroke contrast | Not listed | Moderate |
| x-height | 0.52 em | 0.52 em |
| Average width | 0.60 em | 0.59 em |
| Weights | 6 weights, 300-800 (variable) | 9 weights, 100-900 (variable) |
| Italics | Yes | Yes |
| Scripts | Adlam, Canadian Aboriginal, Cherokee, Latin, Latin Extended and 3 more | Cyrillic, Cyrillic Extended, Latin, Latin Extended and Vietnamese |
| Designer | Google and Universal Thirst | Commercial Type and Greg Gazdowicz |
| Licence | SIL Open Font License 1.1 | SIL Open Font License 1.1 |
- x-height: within 1% of each other, so the two can share a line at the same size.
- Width: Google Sans Code and Roboto Serif have similar average widths (within 1%).
- Weights: Google Sans Code at 700 for headings, Roboto Serif at 400 for text and 700 for bold.
- Scripts: both cover Latin, Latin Extended and Vietnamese. Only Google Sans Code covers Adlam, Canadian Aboriginal, Cherokee, Old Permic and Syriac. Only Roboto Serif covers Cyrillic and Cyrillic Extended.
The two fonts
Heading
Google Sans Code
Open sourceMonospace · MonospaceGoogle Fonts
Free for personal and commercial use. You can self-host, subset and embed it.
Body
Roboto Serif
Open sourceSerif · RationalGoogle Fonts
Free for personal and commercial use. You can self-host, subset and embed it.
CSS for this pairing
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&display=swap');
h1, h2, h3 {
font-family: 'Google Sans Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-weight: 700;
}
body {
font-family: 'Roboto Serif', Georgia, "Times New Roman", serif;
}
Pair Google Sans Code with…
Google Sans Code
Google Sans Good typography is invisible until it is missing.
Google Sans Code
Montserrat Good typography is invisible until it is missing.
Google Sans Code
Inter Good typography is invisible until it is missing.
Google Sans Code
Open Sans Good typography is invisible until it is missing.
Google Sans Code
Sora Good typography is invisible until it is missing.
Google Sans Code
Merriweather Good typography is invisible until it is missing.
Pair Roboto Serif with…
Roboto
Roboto Serif Good typography is invisible until it is missing.
Roboto Mono
Roboto Serif Good typography is invisible until it is missing.
Roboto Slab
Roboto Serif Good typography is invisible until it is missing.
Sora
Roboto Serif Good typography is invisible until it is missing.
Montserrat
Roboto Serif Good typography is invisible until it is missing.
Raleway
Roboto Serif Good typography is invisible until it is missing.