Skip to content

fix(fonts): self-host Inter, JetBrains Mono and Caveat - #61

Closed
raferdev wants to merge 1 commit into
mainfrom
fix/self-host-fonts
Closed

raferdev wants to merge 1 commit into
mainfrom
fix/self-host-fonts

Conversation

@raferdev

Copy link
Copy Markdown
Owner

Summary

  • Why: the main deploy after fix(brand): serve the R/ favicon reliably and fix the manifest link #60 failed in next/font/google (Cannot read properties of null (reading '1')). Google Fonts briefly returned a font URL without a .woff2 extension, which Next's loader can't parse. The same commit built fine minutes earlier, and a re-run succeeded, so every build depended on Google answering normally.
  • Fix: commit the Latin variable .woff2 of each font (the exact files Google serves) and load them with next/font/local. Builds no longer make any network request for fonts.
  • Output: 17 font files across seven subsets drop to 3. The site text only uses Latin characters (→ isn't in any subset we loaded, so it already used a fallback font), and the Latin files are the ones that were already preloaded.
  • The OFL license of each font is committed next to the files.

Verification

  • Full-page screenshots of all four pages, at 1280px and 393px, light and dark, are pixel-identical to the Google Fonts build.
  • Full suite (194 tests) passes against the nginx test container.

🤖 Generated with Claude Code

The production build failed in next/font/google when Google Fonts
returned a font URL without a file extension. Builds depended on Google
being up and answering normally every time.

- commit the latin variable woff2 file of each font (the same files
  Google serves) and load them with next/font/local
- the build no longer makes any network request for fonts
- output drops from 17 font files across seven subsets to 3; the site
  text only uses latin characters, and the latin files are the ones that
  were already preloaded
- full-page screenshots of all four pages, desktop and mobile, light and
  dark, are pixel-identical to the Google Fonts build
- OFL license of each font ships next to the files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ae52bcb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@raferdev

Copy link
Copy Markdown
Owner Author

Closing: the font failure was a transient Google Fonts hiccup; the re-run deployed fine.

@raferdev raferdev closed this Sep 29, 2026
@raferdev
raferdev deleted the fix/self-host-fonts branch September 29, 2026 18:34
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