Skip to content

perf(font): load Geist Mono only where the family is used (ENG-158) - #115

Merged
odanieldcs merged 1 commit into
mainfrom
feature/eng-158
Oct 12, 2026
Merged

odanieldcs merged 1 commit into
mainfrom
feature/eng-158

Conversation

@odanieldcs

@odanieldcs odanieldcs commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Load Geist Mono with next/font/local and preload: false, so pages that never use the family stop fetching the 70KB file ahead of the LCP image.
  • Keep --font-geist-mono on <html>. Code blocks, the language label, inline code, /alunos, and /design-system still resolve the same family, and the geist package is removed.

Test plan

  • /, /blog, /about, /community, /privacy, and /en: no Geist Mono preload and no woff2 request; Inter and Fraunces still preload
  • PostgreSQL post and /alunos: computed family starts with --font-geist-mono, and the woff2 is requested
  • e2e/font-mono.spec.ts on Chromium
  • Lighthouse mobile, median of 3: / perf 95, LCP 2943ms; PostgreSQL post perf 94, LCP 2945ms, CLS 0 (ENG-154 baseline: / 89 / 3634ms, post 93 / 3025ms)

Pages without code were preloading a 70KB file that competed with the LCP image. The CSS variable stays on the document, and the browser fetches the font only when text uses it.
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
danieldcs-com Ready Ready Preview Oct 12, 2026 3:32am UTC

@odanieldcs
odanieldcs merged commit 757df79 into main Oct 12, 2026
8 checks passed
@odanieldcs
odanieldcs deleted the feature/eng-158 branch October 12, 2026 14:48

This branch was successfully deployed

1 active deployment
Preview — a87b037e Deployed Oct 12, 2026 by vercel[bot]
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