chore: remove unused Google Fonts links#2714
Merged
Merged
Conversation
Open Sans and Material Icons were loaded from fonts.googleapis.com but neither font is referenced by font-family anywhere in the application: - Open Sans was last used as the Foundation body font — removed in 2022 when Foundation was deleted during the Bootstrap 5 migration - Material Icons was added in 2019 and never referenced in any CSS Font Awesome 5 is already self-hosted via the font_awesome5_rails gem. Plausible analytics is also self-hosted. Removing these two tags eliminates all external font requests, resolving the GDPR concern with no visual change.
mroderick
marked this pull request as ready for review
July 16, 2026 13:05
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.
In preparing for adopting better security headers, I discovered that these fonts are unused and dead weight (and a privacy concern).
Problem
Two Google Fonts are loaded from
fonts.googleapis.cominapp/views/layouts/application.html.haml:/css?family=Open+Sans:400,300)/icon?family=Material+Icons)This triggers requests to
fonts.googleapis.com(serves@font-faceCSS) andfonts.gstatic.com(serves the actual font files), which is a GDPR concern — user IPs and user-agent data are sent to Google without consent.We investigated whether Fontsource or another approach was needed, but the fonts turned out to be fully unused.
Investigation
Both fonts are unreferenced in any CSS
font-family: 'Open Sans'in SCSS/CSSfont-family: 'Material Icons'in SCSS/CSS@font-facedeclarationsBootstrap 5 uses a system font stack (
system-ui, -apple-system, ...). No custom$font-family-*overrides exist in the project SCSS.Git history confirms they're dead
Open Sans
$body-font-familyin Foundation (foundation_and_overrides.scss)36758d5e). Last CSS reference removed.Material Icons
<link>added to layout (15a70da3)Font Awesome 5 is already self-hosted via the
font_awesome5_railsgem — no CDN issue.Plausible analytics is also self-hosted (
/js/script.js,/api/event) — no GDPR concern.Change
Removed two
<link>tags fromapp/views/layouts/application.html.haml. That's it — no visual change, no regression risk on the rendering front.GDPR Risk Resolved
fonts.googleapis.com@font-faceCSSfonts.gstatic.com.woff2font files