Skip to content

load geist mono so the tool panels render the same everywhere #257

Closed

Description

@yigitdot

Problem

--font-mono in app/globals.css (introduced in #256, previously copied 5×) is:

ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, "Cascadia Mono", "Courier New", monospace

No monospace web font is loaded, so "JetBrains Mono" and "Cascadia Mono" only apply if they're installed locally. In practice:

  • Apple devices get SF Mono (via ui-monospace).
  • Everyone else gets Menlo, Courier New or the browser default.

The hero terminal, the Contact fleet panel, prose code/pre and the drawer's external-link arrow therefore look different across platforms, and on Windows/Linux they fall back to Courier New.

Proposal

Load Geist Mono through next/font/google, the same way app/layout.tsx already loads Geist Sans:

  1. In app/layout.tsx, add Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"], weight: [...] }) and add its .variable to the <html> className next to geistSans.variable.
  2. In app/globals.css, put var(--font-geist-mono) first in --font-mono and keep the current list as the fallback.
  3. Load only the weights the panels use: 400, 500, 600 and 700 (for .fleet-summary .fleet-value).

Notes

  • next/font self-hosts the font files, so the CSP in public/_headers (font-src 'self') needs no change.
  • Cost: one more font file per weight. Check that the added bytes are worth it, or trim the weights.
  • Geist Mono has a different x-height and width from SF Mono. Recheck that the terminal's white-space: nowrap lines and the 140px .progress bar still fit at clamp(11px, 1.2vw, 13px), and that the fleet rows still align.
  • Changing --font-mono also changes Tailwind's default for bare code/pre/kbd/samp and the font-mono utility. Neither is used outside .prose today.

Done when

  • The terminal and fleet panels render in Geist Mono on macOS, Windows and Android.
  • Nothing shifts layout when the font swaps in.
  • pnpm build passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    designenhancementlow-priority

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions