Skip to content

fix(fonts): self-host DM Sans and DM Mono instead of Google Fonts - #98

Open
lorenzocorallo wants to merge 1 commit into
mainfrom
lorenzocorallo/self-host-fonts
Open

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

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

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 called DM Sans Variable, so the --font-* tokens and the toast style point to it; the rendered faces are the same.

Verified: pnpm check, typecheck, test and build pass. The build output has no googleapis/gstatic references and emits the six woff2 files (DM Mono 400/500 and DM Sans opsz, latin and latin-ext each).

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.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a06aae0b-ef79-4445-8209-5be17695a3ec
📥 Commits

Reviewing files that changed from the base of the PR and between 9a3c966 and da8ed38.

⛔ Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 2
  • package.json
  • src/styles.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The project now loads DM Sans and DM Mono from local packages. Theme aliases and toast text use the DM Sans variable font family.

Changes

Local Font Setup

Layer / File(s) Summary
Local font loading and aliases
package.json, src/styles.css
Added the DM Sans variable and DM Mono packages. Replaced the Google Fonts import with local font imports. Updated the sans, serif, heading, and toast font declarations to use "DM Sans Variable".

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to da8ed

The local font changes show no identified user-facing regression and are ready to merge.

Pre-merge checks: Passed 4
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and accurately summarizes the main change: replacing Google Fonts requests with self-hosted DM Sans and DM Mono fonts.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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