Skip to content

chore(web): use geist mono as fallback font for berkeley mono#248

Merged
kianbazza merged 1 commit into
canaryfrom
kianbazza/font-fallback-geist
Mar 28, 2026
Merged

chore(web): use geist mono as fallback font for berkeley mono#248
kianbazza merged 1 commit into
canaryfrom
kianbazza/font-fallback-geist

Conversation

@kianbazza
Copy link
Copy Markdown
Collaborator

@kianbazza kianbazza commented Feb 4, 2026

Font Fallback System for Berkeley Mono

Uses a prebuild script to detect if Berkeley Mono font file exists.
Falls back to Geist Mono from next/font/google for open source users
and git worktree setups where the font submodule isn't initialized.


Note

Low Risk
Low risk: changes are limited to font configuration and build/dev scripts, with the main risk being unexpected font output if the generated lib/fonts.ts differs from expectations.

Overview
Adds a font fallback system so the app uses local Berkeley Mono when available but falls back to Geist_Mono from next/font/google when the Berkeley Mono font file isn’t present.

Introduces scripts/generate-fonts.ts and wires it into predev/prebuild to generate lib/fonts.ts dynamically, updates the mono CSS variable from --font-berkeley-mono to --font-mono, and keeps a berkeleyMono export as a backwards-compatible alias.

Written by Cursor Bugbot for commit f91bd8a. This will update automatically on new commits. Configure here.

Uses a prebuild script to detect if Berkeley Mono font file exists.
Falls back to Geist Mono from next/font/google for open source users
and git worktree setups where the font submodule isn't initialized.
@kianbazza kianbazza mentioned this pull request Feb 4, 2026
Copy link
Copy Markdown
Collaborator Author

kianbazza commented Feb 4, 2026

@kianbazza kianbazza changed the title feat(web): add Geist Mono fallback when Berkeley Mono unavailable feat(web): use geist mono as fallback font for berkeley mono Feb 4, 2026
@kianbazza kianbazza self-assigned this Feb 4, 2026
@kianbazza kianbazza changed the title feat(web): use geist mono as fallback font for berkeley mono chore(web): use geist mono as fallback font for berkeley mono Feb 4, 2026
@kianbazza kianbazza marked this pull request as ready for review February 4, 2026 04:57
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread apps/web/package.json
"private": true,
"scripts": {
"generate-fonts": "tsx scripts/generate-fonts.ts",
"predev": "bun run generate-fonts",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script gen-types accidentally removed from package.json

High Severity

The gen-types script was accidentally deleted from package.json during this change. This script runs tsx scripts/build-types-meta.ts to generate .types/types-meta.json, which is imported by multiple components (type-debug.tsx, type-diff.tsx, type-reference.tsx, type-signature.tsx, type-table-auto.tsx). Without this script entry, developers cannot regenerate the type metadata file, breaking the type documentation system.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Collaborator Author

kianbazza commented Mar 28, 2026

Merge activity

  • Mar 28, 9:03 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 28, 9:03 PM UTC: @kianbazza merged this pull request with Graphite.

@kianbazza kianbazza merged commit d3fa8b2 into canary Mar 28, 2026
6 checks passed
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