Repository navigation
feat(fonts): load geist mono for the tool panels - #266
Merged
Merged
Conversation
Closes #257 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying website with
|
| Latest commit: |
46bae9c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b96f35cf.website-70y.pages.dev |
| Branch Preview URL: | https://claude-geist-mono-font-loadi.website-70y.pages.dev |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
Loads Geist Mono through
next/font/google, the same way the site already loads Geist Sans, and puts it first in--font-mono. The hero terminal, the Contact fleet panel and prosecode/prenow use the same font on every platform. Before this, everything except Apple devices fell back to Menlo, Courier New or the browser default.app/layout.tsx: addsGeist_Mono({ variable: "--font-geist-mono", subsets: ["latin"], weight: ["400","500","600","700"] })and puts its variable on<html>.app/globals.css: the old system list moves to a new--font-mono-systemtoken, and--font-monobecomesvar(--font-geist-mono), var(--font-mono-system).components/site/FleetStatus.tsx: wraps theΣin the two 24h labels in a.fleet-sigmaspan (see below).Characters Geist Mono doesn't have
Google's Geist Mono files leave out
→(U+2192),✓(U+2713) andΣ(U+03A3). The extrasymbols2subset covers only box-drawing characters. Without a fix,→andΣland in the fallback face next/font generates, a resized Arial, where the terminal arrow is 16.5px wide against a 7.4px character cell. That pushes the text on each arrow line out of line with the rest of the terminal.Σin the fleet labels rendered about 35% taller than the letters around it. (✓isn't in Arial either, so it already fell through to the system font.)adjustFontFallback: falseshould drop that fallback, but it has no effect in this build: the generated CSS still contains the Arial face. So:.terminal .arrow,.terminal .ok, the fleet's.fleet-sigmaand the drawer's.mm-arrowuse--font-mono-systemdirectly. They render exactly as they did before this PR and each takes one character cell..fleet-sigmaalso getline-height: 1. Without it, mixing two fonts' vertical metrics on one line made each affected line about 1px taller.Cost
Geist Mono is a variable font, so the four weights share one file per character subset. The build adds 6 woff2 files (~68K total), and only the 22.6K Latin one is preloaded. The others load only on pages that use their characters. The CSP is unchanged because next/font self-hosts the files (
font-src 'self').Verification
pnpm typecheck,pnpm lint,pnpm format:checkandpnpm test(520 passing) all pass, as doespnpm buildincludingcheck:outandcheck:og-image..progressline still fits.56px 14px 1fr) wrap and line up the same as before. The 700-weight summary value renders bold.Σis one 7.5px character cell, and the 24h label rows are 20.1px tall with both fonts.Σfallback and some comment wording they flagged are fixed in the second commit.Not checked: I only checked on macOS. Windows and Android rendering, and a throttled-network reload to watch the font swap in, haven't been done.
Closes #257
🤖 Generated with Claude Code