You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(fonts): self-host DM Sans instead of loading it from Google Fonts - #30
DM Sans is now served from public/fonts/dm-sans/ (same layout as the HugeIcons font): the two woff2 files (latin, latin-ext) and @font-face rules that Google Fonts served for DM+Sans:opsz,wght@9..40,400..700, plus the OFL licence.
index.html loads /fonts/dm-sans/dm-sans.css with the same non-blocking media="print" trick and <noscript> fallback. The Google preconnect hints are gone.
CSP: removed https://fonts.googleapis.com from style-src and https://fonts.gstatic.com from font-src.
README: Google Fonts is no longer listed as a third-party request.
Family name ("DM Sans"), axes (opsz 9–40, wght 400–700), unicode-range and font-display: swap are unchanged, so the design renders the same.
Why
Privacy: loading fonts from Google Fonts sends every visitor's IP address to Google. With the fonts self-hosted, Google no longer needs to be listed as a data recipient in the PoliNetwork privacy policy.
Verification
pnpm lint, pnpm test, pnpm typecheck, pnpm build: all pass
grep -ri "googleapis\|gstatic" dist: no matches
dist/fonts/dm-sans/ contains dm-sans-latin.woff2 and dm-sans-latin-ext.woff2
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: 4c7949f7-34d9-4a63-81a3-6236af446418
📥 Commits
Reviewing files that changed from the base of the PR and between 8f5998c and 9b2596a.
⛔ Files ignored due to path filters: 2
public/fonts/dm-sans/dm-sans-latin-ext.woff2 is excluded by !**/*.woff2
public/fonts/dm-sans/dm-sans-latin.woff2 is excluded by !**/*.woff2
📒 Files selected for processing: 4
README.md
index.html
public/fonts/dm-sans/OFL.txt
public/fonts/dm-sans/dm-sans.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
DM Sans is now loaded from local WOFF2 files through a local stylesheet. The CSP no longer allows Google Fonts origins, and the README lists DM Sans as self-hosted.
Changes
Self-hosted DM Sans
Layer / File(s)
Summary
Local font declarations and license public/fonts/dm-sans/dm-sans.css, public/fonts/dm-sans/OFL.txt
Adds local DM Sans font-face rules for Latin and Latin-ext, weights 400–700, with font-display: swap. Adds the SIL Open Font License 1.1 text.
Page loading and CSP index.html, README.md
Loads the local DM Sans stylesheet with a local noscript fallback and removes Google Fonts origins from the CSP. The README identifies DM Sans and HugeIcons as self-hosted.
Priority: ➖ Normal
Change: Refactor
Merge Risk:⚪ Minimal · up to 9b259
DM Sans is served from local files, and the inspected assets support the declared faces. No actionable merge-blocking issue remains.
Pre-merge checks: 4
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: replacing Google Fonts delivery with a self-hosted DM Sans font.
Docstring Coverage
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
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
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.
What
public/fonts/dm-sans/(same layout as the HugeIcons font): the two woff2 files (latin, latin-ext) and@font-facerules that Google Fonts served forDM+Sans:opsz,wght@9..40,400..700, plus the OFL licence.index.htmlloads/fonts/dm-sans/dm-sans.csswith the same non-blockingmedia="print"trick and<noscript>fallback. The Google preconnect hints are gone.https://fonts.googleapis.comfromstyle-srcandhttps://fonts.gstatic.comfromfont-src.Family name (
"DM Sans"), axes (opsz 9–40, wght 400–700),unicode-rangeandfont-display: swapare unchanged, so the design renders the same.Why
Privacy: loading fonts from Google Fonts sends every visitor's IP address to Google. With the fonts self-hosted, Google no longer needs to be listed as a data recipient in the PoliNetwork privacy policy.
Verification
pnpm lint,pnpm test,pnpm typecheck,pnpm build: all passgrep -ri "googleapis\|gstatic" dist: no matchesdist/fonts/dm-sans/containsdm-sans-latin.woff2anddm-sans-latin-ext.woff2