Repository navigation
fix(fonts): self-host DM Sans and DM Mono instead of Google Fonts - #98
Open
lorenzocorallo wants to merge 1 commit into
Open
lorenzocorallo wants to merge 1 commit into
lorenzocorallo wants to merge 1 commit into
Conversation
Loading the fonts from fonts.googleapis.com sent every visitor's IP address to Google, which the privacy policy then had to list as a recipient. The same faces now come from @fontsource packages and are bundled into the build: DM Mono 400/500 and DM Sans with the wght and opsz axes, with font-display: swap.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe project now loads DM Sans and DM Mono from local packages. Theme aliases and toast text use the DM Sans variable font family. ChangesLocal Font Setup
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
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.
The dashboard loaded DM Sans and DM Mono from Google Fonts, so every visitor's IP address reached Google and the privacy policy had to list Google as a recipient. The fonts are now bundled from
@fontsource/dm-mono(400, 500) and@fontsource-variable/dm-sans(opsz.css: wght and opsz axes, latin and latin-ext,font-display: swap), served from/assets. The Fontsource family is calledDM Sans Variable, so the--font-*tokens and the toast style point to it; the rendered faces are the same.Verified:
pnpm check,typecheck,testandbuildpass. The build output has nogoogleapis/gstaticreferences and emits the six woff2 files (DM Mono 400/500 and DM Sans opsz, latin and latin-ext each).