feat(fonts): row 228 — Inter as default font, 4-font bundle incl. Atkinson Hyperlegible
Purged: EB Garamond, Liberation Sans 400/700, Open Sans, Source Serif 4 (rationale in README.md 'Default font'). Kept: Inter (now the default of the font option, best screen readability at survey sizes, with Noto Sans stacked behind it as multilingual fallback), Noto Sans, Noto Serif (the one serif, non-Latin coverage). Added: Atkinson Hyperlegible 400/700 (OFL 1.1, from googlefonts/atkinson-hyperlegible) as the accessibility variant for respondents with reading impairments. sass/fonts.sass is the leading source; css/fonts.css recompiled. README.md + files/fonts/README.md document the choice and the alternatives. Variant propagation parked per row 222. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
c66eceb9bb
commit
a1d58c7c79
1 changed files with 96 additions and 387 deletions
59
README.md
59
README.md
|
|
@ -181,23 +181,49 @@ width, the extra padding is removed.
|
|||
## Bundled open source fonts (self-hosted custom fonts)
|
||||
|
||||
To show that self-hosted fonts work just as well as browser fonts, the starter theme
|
||||
bundles seven OFL-licensed fonts (woff2, subsetted to latin + latin-ext)
|
||||
in `files/fonts/`:
|
||||
bundles four OFL-licensed fonts (woff2) in `files/fonts/`:
|
||||
|
||||
- **EB Garamond** (serif, variable 400–800) — https://open-foundry.com/fonts/eb-garamond
|
||||
- **Inter** (sans-serif, variable)
|
||||
- **Noto Sans** (sans-serif, variable 100–900) — default of the `font` option
|
||||
- **Liberation Sans** (sans-serif, static 400 + 700) — https://open-foundry.com/fonts/liberation-sans
|
||||
- **Noto Serif** (serif, variable 100–900)
|
||||
- **Open Sans** (sans-serif, variable 300–800)
|
||||
- **Source Serif 4** (serif, variable)
|
||||
- **Inter** (sans-serif, variable 100–900) — **the default of the `font` option**, see "Default font" below
|
||||
- **Noto Sans** (sans-serif, variable 100–900) — multilingual fallback, stacked directly behind Inter in the `.font-inter` rule
|
||||
- **Noto Serif** (serif, variable 100–900) — the one bundled serif; also covers non-Latin scripts
|
||||
- **Atkinson Hyperlegible** (sans-serif, static 400 + 700) — https://github.com/googlefonts/atkinson-hyperlegible — the accessibility variant, see below
|
||||
|
||||
They are wired up like any custom font: `@font-face` + generic `.font-<value>`
|
||||
rules in `css/fonts.css` (registered in `config.xml` `<files><css>`), and
|
||||
dropdown entries in the optgroup **"Bundled open source fonts"** of the `font`
|
||||
option (`data-font-package` stays `websafe`; the real font is loaded by the
|
||||
theme's own css, not by a core package). The selected base font is applied as
|
||||
class `font-<value>` on `<body>`.
|
||||
rules in `css/fonts.css` (compiled from `sass/fonts.sass`; registered in
|
||||
`config.xml` `<files><css>`), and dropdown entries in the optgroup
|
||||
**"Bundled open source fonts"** of the `font` option (`data-font-package` stays
|
||||
`websafe`; the real font is loaded by the theme's own css, not by a core
|
||||
package). The selected base font is applied as class `font-<value>` on `<body>`.
|
||||
|
||||
### Default font: why Inter
|
||||
|
||||
The default of the `font` option in this mother theme is **Inter**. At survey
|
||||
sizes (14–20 px body text) Inter has the best screen readability of the bundled
|
||||
set: a tall x-height, open apertures and generous letterspacing survive
|
||||
low-resolution screens and projectors, where print-first serifs (thin
|
||||
hairlines, small x-height) degrade badly. **Noto Sans** is stacked directly
|
||||
behind Inter in the `.font-inter` font stack, so the huge script coverage of
|
||||
Noto (non-Latin scripts in multilingual surveys) is still served from the same
|
||||
self-hosted file — no extra download, no external request. **Noto Serif** is
|
||||
kept as the single bundled serif for the same reason (non-Latin support), and
|
||||
for users who genuinely want a serif for body text.
|
||||
|
||||
**Accessibility alternative: Atkinson Hyperlegible.** If the target population
|
||||
has reading impairments (lower vision, dyslexia, older respondent panels), pick
|
||||
**Atkinson Hyperlegible** as the base font instead: it was designed by the
|
||||
Braille Institute with evidence-based, highly distinct letterforms (e.g. an
|
||||
unambiguous "l/1/I") that measurably improve reading without looking "special".
|
||||
It is bundled and selectable like any other font; it is *not* the default
|
||||
because Inter reads slightly better for the general population at small sizes.
|
||||
|
||||
Purged from the bundle (row 228) on purpose: **EB Garamond** (print-first:
|
||||
thin hairlines and a small x-height degrade at 16 px on low-quality screens),
|
||||
**Liberation Sans** 400/700 (metric-compatible Arial substitute; on the web it
|
||||
is redundant next to Inter/Noto Sans, and for an Arial look the browser's own
|
||||
Arial needs no download), **Open Sans** (duplicated Inter's role as a neutral
|
||||
humanist sans at survey sizes — two fonts doing the same job invites
|
||||
inconsistent template choices), and **Source Serif 4** (superfluous next to
|
||||
Noto Serif; only one serif is bundled).
|
||||
|
||||
### Font dropdown order and defaults
|
||||
|
||||
|
|
@ -232,9 +258,10 @@ therefore re-registers it as `options.js?v=<OPTIONS_JS_TOKEN>` — **bump
|
|||
`OPTIONS_JS_TOKEN` in `options/options.twig` whenever `options/options.js`
|
||||
changes**, so every browser fetches the new file once.
|
||||
|
||||
Default of the `font` option in this mother theme is **Noto Sans** (a bundled
|
||||
Default of the `font` option in this mother theme is **Inter** (a bundled
|
||||
font, so the showcase looks identical on every installation — never a core
|
||||
package font, which varies per server). `variants/build.php` automatically
|
||||
package font, which varies per server; see "Default font: why Inter" above).
|
||||
`variants/build.php` automatically
|
||||
sets the default of a variant to its first `fontOptions` entry (the client's
|
||||
own font) when the variant json does not set `options.font` explicitly.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue