perf/legal: self-host Inter and JetBrains Mono fonts#66
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes external Google Fonts requests by self-hosting Inter and JetBrains Mono, ensuring the site no longer contacts fonts.googleapis.com / fonts.gstatic.com at runtime (GDPR-related motivation).
Changes:
- Removed Google Fonts
<link>tags from the modern layout and switched to self-hosted fonts. - Added
@font-facedeclarations to Tailwind CSS and introduced a Gulp task to copy font assets intodist/. - Updated
profile/spxp-postscontent/timestamps (appears unrelated to the font/legal goal of this PR).
Show a summary per file
| File | Description |
|---|---|
| src/layouts/modern.html | Removes Google Fonts includes; relies on Tailwind CSS for font declarations. |
| src/css/tailwind.css | Adds @font-face rules pointing to local WOFF2 assets. |
| src/assets/fonts/inter-latin.woff2 | Adds self-hosted Inter Latin WOFF2 font file. |
| src/assets/fonts/jetbrains-mono-latin.woff2 | Adds self-hosted JetBrains Mono Latin WOFF2 font file. |
| gulpfile.js | Adds copyFonts task and wires it into dev and build. |
| profile/spxp-posts | Updates timestamps and adds/changes post entries (not described in PR). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/6 changed files
- Comments generated: 2
Removes runtime requests to fonts.googleapis.com and fonts.gstatic.com. Loading Google Fonts dynamically transmits visitor IP addresses to Google servers, which violates GDPR under German law (LG München I, Jan 2022). - Download latin-subset woff2 files for Inter (variable, 100–900) and JetBrains Mono (variable, 100–800) into src/assets/fonts/ - Declare @font-face in tailwind.css so fonts are served from /assets/fonts/ - Add copyFonts gulp task; include in dev and build pipelines - Remove three Google Fonts <link> tags from modern.html layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a71985a to
60a1f41
Compare
Member
Author
|
Re Copilot's suggestion about watching the fonts directory: font files are committed binary assets that don't change during development, so there's no practical benefit to watching them. In the unlikely event a font file is ever swapped out, restarting |
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.
Summary
fonts.googleapis.com/fonts.gstatic.comsrc/assets/fonts/@font-facedeclarations intailwind.css; adds acopyFontsGulp task<link>tags from the layoutMotivation
Loading Google Fonts dynamically transmits visitor IP addresses to Google servers in the US. Under German law this violates GDPR — the LG München I ruled in January 2022 that this constitutes an unlawful data transfer without consent and awarded damages to the plaintiff.
Test plan
npm run build— should complete without errorsdist/assets/fonts/contains both woff2 filesnpm run dev) and verify Inter and JetBrains Mono render correctlygoogleapis.comorgstatic.com