Skip to content

fix(front): self-host the Inter and IBM Plex Mono fonts - #4539

Open
mikeh-lago wants to merge 2 commits into
mainfrom
fix/self-host-fonts
Open

mikeh-lago wants to merge 2 commits into
mainfrom
fix/self-host-fonts

Conversation

@mikeh-lago

@mikeh-lago mikeh-lago commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Context

The app loads Inter and IBM Plex Mono from Google Fonts, so every page load calls fonts.googleapis.com and fonts.gstatic.com. Self-hosted and air-gapped installs can't reach those hosts, and the CSP has to allow them.

Description

  • Add the @fontsource packages for Inter and IBM Plex Mono and import them in src/main.css next to the other global stylesheets, so the fonts are bundled with the app.
  • Remove the Google Fonts <link> tags from index.html.
  • Drop fonts.googleapis.com and fonts.gstatic.com from style-src and font-src in nginx/csp.conf.template.

Fixes LAGO-1986

Load the fonts from @fontsource packages bundled with the app instead of
Google Fonts. The UI no longer calls fonts.googleapis.com or
fonts.gstatic.com, so the CSP drops both hosts from style-src and font-src.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T22:58:03.148758Z 68d1bb1 PR opened
🔒 Security Review ✅ Completed 2026-10-26T22:57:59.653201Z 68d1bb1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Keep the fonts with the other global stylesheets instead of the JS entry.
@sonarqubecloud

Copy link
Copy Markdown

@lago-claude-ai-agent

Copy link
Copy Markdown
Contributor

Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green

HOLD — Add focused regression coverage that fails on the previous setup and verifies the required Inter and IBM Plex Mono weights are sourced locally while Google Fonts origins are absent from index.html and the CSP.

@mikeh-lago

Copy link
Copy Markdown
Contributor Author

Not adding these tests. Nothing in the repo tests index.html or nginx/csp.conf.template, so this would add a new kind of test that just checks a string is missing from a config file. It wouldn't protect much: if someone re-added the Google Fonts <link>, the tightened CSP would block it and the fonts would visibly fall back to Arial. The production build shows the Inter and IBM Plex Mono @font-face rules and font files are bundled, and E2E passes against them.

This branch has not been deployed

No deployments
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