sans
UI body, controls, navigation — the workhorse face. Default everywhere.
The quick brown fox jumps over the lazy dog. 0123456789.
Closed vocabulary of typeface roles, canonical CSS variables, hosting rules, weights, scale, fallback chain, and tests for typography in every Koder surface (web/landing, Flutter mobile/desktop, CLI/TUI). Self-hosted-first: webfonts ship as `.woff2` from the consumer's own origin; Google Fonts / jsDelivr / unpkg are forbidden.
Other Koder specs reference roles, never specific typeface names. Wave 1 reuses Inter + JetBrains Mono under OFL; Wave 2 introduces Koder Display; Wave 3 ships proprietary Koder Sans + Koder Mono.
UI body, controls, navigation — the workhorse face. Default everywhere.
The quick brown fox jumps over the lazy dog. 0123456789.
Code, terminal output, numeric tables, IDs, and hashes.
fn run() -> Result<(), Error> { let n = 42; Ok(()) }
Headlines, hero text, posters, OG images. Wave 1 falls back to the sans face at heavy weights.
Build the next generation.
Long-form reading mode (optional, opt-in per surface).
Long-form reading benefits from quiet shapes and generous line-height.
The required weights per role. Variable fonts (Inter VF, JetBrains Mono VF) are preferred — a single .woff2 covers every weight in the family.
Use these px values for font-size; map to CSS custom properties when the surface has more than ~5 sizes. Line-heights follow the body/UI/headline/reading buckets.
line-height: 1.4line-height: 1.4line-height: 1.5line-height: 1.5line-height: 1.2line-height: 1.2line-height: 1.2line-height: 1.2Declare these once at :root. Component CSS resolves font-family through the variables so a Wave-2/3 typeface swap is a single-line change.
:root {
--kds-font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--kds-font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
--kds-font-display: var(--kds-font-sans);
--kds-font-serif: ui-serif, Georgia, "Times New Roman", serif;
}
body, button, input, select, textarea { font-family: var(--kds-font-sans); }
code, kbd, pre, samp, .mono { font-family: var(--kds-font-mono); }
h1, h2, h3, .display { font-family: var(--kds-font-display); }Every surface — landing, mobile, desktop, TV, web — must pass these checks before release. See specs/fonts/typography.kmd § Tests.
| ID | Test |
|---|---|
T1 | grep for forbidden hosts (fonts.googleapis, fonts.gstatic, jsdelivr/unpkg font CDNs) returns empty. |
T2 | Every font-family in CSS/Dart/templ resolves to a role in the table above or its fallback chain. |
T3 | Every @font-face block includes font-display: swap. |
T4 | Hero / critical pages emit <link rel="preload" as="font" type="font/woff2" crossorigin> for the body face. |
T5 | Each shipped .woff2 is ≤ 50 KB per subset/weight (or carries an exception comment). |
T6 | Variable face used when the upstream provides one (Inter VF / JetBrains Mono VF). |
T7 | AAA contrast preserved across the fallback chain (system fonts pass tools/a11y-test/). |
Type to search. Press / from anywhere.