Skip to content

perf(theme): cache fonts and add metric-matched fallbacks - #1

Merged
Madraka merged 1 commit into
mainfrom
perf/font-cache-and-fallbacks
Oct 21, 2026
Merged

Madraka merged 1 commit into
mainfrom
perf/font-cache-and-fallbacks

Conversation

@Madraka

@Madraka Madraka commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Same fix as cloudhal-dev/cloudhal#54 for this copy of the theme.

  • Fonts move to /fonts/v1/ and are cached for a year, immutable (they were served with max-age=0, must-revalidate, so every reload waited for them).
  • font-fallbacks.css: a metric-matched local fallback after each web font in the pairing stacks (measured in Chrome: 0.0% height difference), so the swap does not move the text.

Checked locally: build passes and dist/client/_headers carries the /fonts/v1/* rule.

🤖 Generated with Claude Code

Same fix as cloudhal-dev/cloudhal#54 for this copy of the blog theme: fonts
move to /fonts/v1/ with a one-year immutable Cache-Control, and each web font
in the pairing stacks is followed by a metric-matched local fallback
(font-fallbacks.css), so reloads and font swaps no longer move the text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka merged commit 128811f into main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant