Commit ce3f69b
authored
perf: wave D — self-host Inter latin subset, preload, font-display: optional (#47)
Replaces the @fontsource-variable/inter @import with a self-declared
@font-face block targeting a single 48 KiB latin subset shipped from
/public/fonts/inter-latin-variable.woff2, plus a <link rel="preload">
in BaseLayout.astro so the font byte stream races CSS parsing.
- Removes 6 unused @font-face blocks (cyrillic, cyrillic-ext, greek,
greek-ext, vietnamese, latin-ext) that fontsource ships by default —
the site is English-only.
- font-display: optional eliminates FOUT/FOIT entirely; with the
preload tag the latin subset typically arrives before first paint.
- Cache rule already in place from wave A (/fonts/* immutable,
max-age=31536000), so repeat visits skip the network round-trip.
JetBrains Mono kept on @fontsource for now — only used in below-fold
code blocks, not critical path.
Part of audits/perf-2026-05/ remediation. Lighthouse re-run pending.1 parent d08c823 commit ce3f69b
3 files changed
Lines changed: 25 additions & 2 deletions
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
4 | 19 | | |
5 | 20 | | |
6 | 21 | | |
| |||
0 commit comments