Repository navigation
fix(fonts): self-host Inter and drop the unused Roboto Mono link - #834
Merged
Merged
Conversation
Inter was loaded from Google Fonts with display=optional, so on a slow first load the browser kept the system-ui fallback for the entire page view and the brand font never appeared. Roboto Mono was fetched on every page but no design token references it ($mono is Söhne Mono, menlo), so the request was pure waste. Load Inter from @fontsource/inter instead (latin 400-700, the only weights in use). The design system's $body token already names Inter first, so no token or globalStyles change is needed, and the third-party render-blocking stylesheet request goes away.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The font imports, dependency metadata, and removal of obsolete external resources are consistent and complete.
0 open findings
What changed in this PR
Self-hosts Inter to ensure consistent typography while removing unused external font requests.
Changes:
- Adds Fontsource Inter weights 400–700 globally.
- Removes Google Fonts links for Inter and Roboto Mono.
- Adds and locks the Fontsource dependency.
| File | Description |
|---|---|
pages/_app.tsx |
Imports self-hosted Inter styles. |
pages/_document.tsx |
Removes external font stylesheets. |
package.json |
Adds Fontsource Inter dependency. |
pnpm-lock.yaml |
Locks the new dependency. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
rickstaa
approved these changes
Oct 8, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Inter is the design system's body font (
$body: "Inter, -apple-system, system-ui, sans-serif"), but it was loaded from Google Fonts withdisplay=optional: on a slow first load the browser keeps the system-ui fallback for the entire page view, so the brand font often never renders. Separately, every page fetched a Roboto Mono stylesheet that no design token references ($monoisSöhne Mono, menlo), so it was pure waste.Why Fontsource instead of Google Fonts
fonts.googleapis.comandfonts.gstatic.com) in the critical path, and the request leaks visitor IPs to Google, a recurring GDPR complaint for public explorers.next/font/googlewas the alternative, but it downloads from Google at build time; Fontsource avoids that entirely.)font-display: swap, so thedisplay=optionalpermanent-fallback behavior is gone.Type of Change
Related Issue
n/a. Spotted while reviewing Explorer typography for #802 design work.
Changes Made
@fontsource/inter(latin 400-700, the only weights used in the repo; nothing uses 800/900) inpages/_app.tsx<link>tags frompages/_document.tsxglobalStyleschanges needed:$bodyalready names Inter first, and Fontsource's family name matchesTesting
pnpm typecheckandpnpm lintclean)Production build left to CI; local WSL environment can't sustain a full
next build.Screenshots (if applicable)
n/a. No visual change when Inter was already rendering; fixes the cases where it silently wasn't.
Checklist
Additional Notes
$untitled(Untitled Sans) and$mono(Söhne Mono) still reference Klim fonts that are never loaded anywhere, so they silently fall back to system fonts. Fixing that means either shipping licensed files or changing the tokens in@livepeer/design-system; out of scope here.