Typography
One or two families, type roles for every kind of text, and fonts you are allowed to use on the web.
Families
A guide uses one or two families: one for display and headings, one for text, or one for both. A third, monospaced, is allowed for codes and numbers that must line up (La Espiga uses one for the pick-up code).
Type roles
Code never asks for «20 px bold». It asks for a role.
| Role | For | La Espiga, phone → desktop |
|---|---|---|
display | the one big line of a page | 36 → 56 px, headings family |
title | the title of a screen | 26 → 34 px |
heading | a section | 20 → 24 px |
body | text | 16 → 17 px, text family |
small | notes, help under a field | 14 px |
label | buttons, tabs, field labels | 15 px, medium weight |
number | prices and quantities | text family with tabular figures |
code | the pick-up code | monospaced, 22 px, wide spacing |
Each role has its family, size, line height, weight and letter spacing, for phone and desktop. Body text is never under 16 px, and lines of text stay between about 45 and 75 characters.
Fonts you are allowed to use
| Source | Allowed |
|---|---|
| Fonts under an open licence (SIL Open Font License, Apache) | yes; Design proposes from this catalogue |
| Fonts you bought with a licence that includes web use | yes; upload the files and record the licence |
| Fonts without a web licence, or copied from another site | no |
Uploaded fonts go to design/brand/fonts/ with a line in design/brand/fonts/LICENSES.md saying where the licence comes from. Design never asks you to break a licence and never suggests a font only because a famous brand uses it.
How fonts are served
Fonts are served with your app, from your own domain: no third-party font service sees your visitors. They are subset to the languages your guide declares, use font-display: swap so text shows at once, and load two weights per family unless the guide asks for more.