Skip to content

Serve website fonts locally and defer content until fonts load - #1077

Merged
nedtwigg merged 4 commits into
mainfrom
fix/issue-1075
Oct 8, 2026
Merged

nedtwigg merged 4 commits into
mainfrom
fix/issue-1075

Conversation

@dormouse-bot

@dormouse-bot dormouse-bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

The website serves Ubuntu Mono and Ubuntu Sans Mono from dormouse.sh through @fontsource/ubuntu-mono and @fontsource/ubuntu-sans-mono 5.3.0, removing the Google Fonts stylesheet and preconnects. Only regular weight is imported, matching the former Google request; other weights remain synthesized, and unicode-range subsets load as needed.

Every website route now preloads the two Latin WOFF2 fonts and defers initial content until the parsed page's font layout is ready. The gate runs inline before content can paint and works independently of the application bundle. Failed fonts reveal the page; a three-second timeout bounds stalled loading, and JavaScript-disabled visits remain readable. This covers prerendered pages and the SPA fallback.

The Privacy Policy removes the Google Fonts disclosure introduced by #997, without adding a replacement font disclosure. The Terms of Service and terms acceptance version do not change.

Validation: website typecheck and all 351 tests pass; the production build succeeds. All 16 generated HTML pages contain the font gate and both preloads, with no Google Fonts endpoints. Browser checks cover delayed fonts on home, privacy, docs, and desktop playground routes, stalled and failed fonts, a blocked application bundle, and disabled JavaScript. Spec lint and its 34 self-checks, public-docs lint, and Markdown lint/tests pass.

Dependency disclosure stays unchanged because the generator excludes visitor-only website packages from installed-artifact disclosures. The lockfile also removes orphaned pg@8.23.0, pg-protocol@1.16.0, pg-connection-string@2.14.0, and pg-cloudflare@1.4.0 entries that nothing in the workspace resolves to.

Closes #1075 — automated triage

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8400a3d
Status: ✅  Deploy successful!
Preview URL: https://724482c8.mouseterm.pages.dev
Branch Preview URL: https://fix-issue-1075.mouseterm.pages.dev

View logs

@nedtwigg nedtwigg changed the title feat: serve website fonts from dormouse.sh instead of Google Fonts Serve website fonts locally and defer content until fonts load Oct 8, 2026
@nedtwigg
nedtwigg merged commit ea1eb07 into main Oct 8, 2026
8 checks passed
@nedtwigg
nedtwigg deleted the fix/issue-1075 branch October 8, 2026 21:03
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.

Self-host the website fonts instead of loading Google Fonts

2 participants