Typography
Three faces with separate jobs: a wood-type slab for titles, a workhorse grotesque for reading, a mono for code.
In this chapter 7 pages
The faces
Point, line, plane
Message passing on simplicial complexes
loss = F.cross_entropy(logits, y)
Rules for Ultra
- Titles only, at 24px and up. It is too heavy to read in sentences.
- Sentence case. No capitals throughout, no italics, no letter-spacing beyond the built-in -0.01em.
- A page title may end in the tomato full stop. One per page.
- While Ultra loads, titles show in Georgia Bold scaled to Ultra's widths and line heights (the
Ultra Fallbackface), or in Liberation Serif Bold where Georgia is missing, so they keep their size and line breaks when Ultra arrives. Reading text and code get the same treatment from Arial and from Menlo or Liberation Mono.
Rules for reading text
- Body is 17px with 1.6 line height, in a column of about 68 characters (
--ply-layout-measure). - Headings from h3 down use Libre Franklin bold. Space above a heading is larger than space below it.
- Numbers in tables use tabular figures so columns line up. The table component sets this.
- Mono is for code and values, and for short names such as tools in a list of chips. A label that only needs to look technical stays in the text face.
- Paragraphs, list items, definitions, and captions set with
text-wrap: pretty, so a line does not end on a lone word. Headings balance. - In prose, emphasis is the true italic one step heavier than the body; see Long-form writing.
Glyphs outside the Latin subset
The self-hosted faces hold Latin. An accented author name, the multiplication sign, or a math operator falls outside that subset. Left alone, the browser searches every installed font for a stand-in, which put hundreds of milliseconds into the first layout on a slow phone. fonts.css names the stand-in, the Arial family the font stack already ends on, in two faces for the light and bold weights. The glyphs keep the size they would have had.
Scale
| Token | Value | Sample |
|---|---|---|
--ply-size-xs | 0.8125rem | Simplices and cells |
--ply-size-sm | 0.875rem | Simplices and cells |
--ply-size-ui | 0.9375rem | Simplices and cells |
--ply-size-md | 1rem | Simplices and cells |
--ply-size-body | 1.0625rem | Simplices and cells |
--ply-size-body-wide | 1.125rem | Simplices and cells |
--ply-size-lg | 1.25rem | Simplices and cells |
--ply-size-xl | 1.5rem | Simplices and cells |
--ply-size-2xl | 2rem | Simplices and cells |
--ply-size-3xl | 2.75rem | Simplices and cells |
--ply-size-4xl | 4rem | Graphs |
--ply-size-display | clamp(3rem, 1.6rem + 4.4vw, 5.75rem) | Graphs |
The display size is fluid: 48px on a phone, growing with the viewport to 92px.