Skip to content

Settings: Font card with live preview, font gallery, and line height - #17716

Closed
azooz2003-bit wants to merge 11 commits into
mainfrom
terminal-font-card
Closed

azooz2003-bit wants to merge 11 commits into
mainfrom
terminal-font-card

Conversation

@azooz2003-bit

Copy link
Copy Markdown
Collaborator

Changing the terminal font meant picking a name from a plain-text menu in the middle of the Ghostty options card, with no way to see a font before applying it. This PR puts fonts first.

Settings > Terminal now opens with a Font card:

  • Live preview of a shell prompt and some code in the chosen font, size and line height. It includes the glyphs people compare fonts by: 0O 1lI |! => != -> {}[]().
  • Font gallery. The Font button opens a searchable list of installed monospaced fonts, each drawn in its own face with a sample line.
    • Hovering a font previews it in the card. Clicking applies it to open terminals.
    • "Default (JetBrains Mono)" returns to Ghostty's built-in font.
  • Font Size, which moved here from the options card.
  • Line Height (adjust-cell-height), a percentage stepper. A pixel value set in a config file is shown as +N px.
  • Thicker Strokes (font-thicken).

Every row still writes one key to cmux's Ghostty config and names a later-loading file that overrides it. The Font card and the Ghostty options card now share one TerminalGhosttyOptionsModel, so an edit in one isn't undone when the other refreshes. Settings search finds the new rows ("line height", "thicken", "change font").

Screenshots

Recorded in the app by SettingsTerminalBehaviorUITests.testFontCardShowsPreviewAndFontGallery on a CI Mac at b005102 (run https://github.com/manaflow-ai/cmux/actions/runs/36442773211): open the gallery, hover Courier New and Menlo (the preview follows), search "men", pick Menlo, step Line Height to +10%, then restore the defaults.

Hovering a font previews it Menlo with +10% line height

ui-lab renders of the preview and gallery (scripts/ui-lab/ui-lab.py scripts/ui-lab/harnesses/terminal-font-card.swift):

Font gallery (dark) Font gallery (light)

Preview, default font (JetBrains Mono, 13 pt):

Preview, Menlo 14 pt with +10% line height:

Preview, Courier New 16 pt:

Changelog

Added: Settings > Terminal has a Font card with a live preview, a searchable font gallery that shows each font in its own face, and Line Height and Thicker Strokes settings.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Settings > Terminal now opens with a Font card that shows a live preview of shell and code in the chosen font, size, and line height, plus a searchable gallery of installed monospaced fonts drawn in their own faces.

  • Hovering a font in the gallery previews it in the card; clicking applies it to open terminals, and "Default (JetBrains Mono)" restores the built-in font.
  • Font Family and Font Size move out of the Ghostty options card into the new card, which also adds Line Height (adjust-cell-height) and Thicker Strokes (font-thicken) rows.
  • Line-height parsing matches Ghostty: percentages (8%) or device pixels (2), with a pixel value from a config file shown as +N px; invalid spellings like 15 % are rejected.
  • The Font card and the Ghostty options card share one TerminalGhosttyOptionsModel, so an edit in one isn't undone by the other's refresh.
  • Rows report save failures and name the config file that overrides a written value; settings search finds the new rows.
  • Adds a UI test that walks the card and restores defaults so the runner's Ghostty config is untouched.

Written for commit d1a7642. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Added terminal font settings with a live preview, a searchable monospaced font picker, and controls for font family, size, line height, and stroke thickness.
    • Added percentage- and pixel-based line-height adjustments, plus an option to thicken font strokes.
    • Terminal settings now display save failures and identify when another configuration overrides a saved value. Controls remain disabled until settings finish loading.

Migrated from #15210 after correcting the PR author identity. The head branch and commit history are preserved.

teamleaderleo and others added 11 commits September 28, 2026 03:35
Settings > Terminal now opens with a Font card: a preview of shell and
code in the chosen font, size and line height, a searchable font list
that draws each installed monospaced font in its own face (hover to
preview, click to apply), and rows for font size, line height
(adjust-cell-height) and thicker strokes (font-thicken).

The Font card and the Ghostty options card share one options model so
an edit in either survives the other's refresh.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s, fix search anchors

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…xel line height steps

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e height, restore)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…I test

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he font button

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@azooz2003-bit azooz2003-bit added the needs a call Finished and held for a team design or product decision (see #13742 and the gallery in #15427) label Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4357cfec-b797-48ce-9f5a-68ed44eec876
📥 Commits

Reviewing files that changed from the base of the PR and between a8c4861 and d1a7642.

📒 Files selected for processing (20)
  • Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/GhosttyTerminalOptions/GhosttyCellHeightAdjustment.swift
  • Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/GhosttyTerminalOptions/GhosttyTerminalOptionChange.swift
  • Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/GhosttyTerminalOptions/GhosttyTerminalOptionKey.swift
  • Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/GhosttyTerminalOptions/GhosttyTerminalOptions.swift
  • Packages/macOS/CmuxFoundation/Tests/CmuxFoundationTests/GhosttyTerminalOptionsTests.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Models/NSFont+TerminalFamily.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Models/TerminalGhosttyOptionsModel.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+TerminalGhosttyOptions.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalFontCard.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalFontFamilyPicker.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalFontPreview.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalGhosttyOptionRow.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalGhosttyOptionsCard.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalSection.swift
  • Packages/macOS/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsRowAnchorResolutionTests.swift
  • Packages/macOS/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsSearchIndexTests.swift
  • Resources/Localizable.xcstrings
  • cmuxUITests/SettingsTerminalBehaviorUITests.swift
  • scripts/ui-lab/harnesses/terminal-font-card.swift
  • scripts/ui-lab/shims/CmuxFont.swift
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Note

Pull Request opener @azooz2003-bit is not an author or co-author of any commit in this PR (commit identities: teamleaderleo, claude). The CLA check will still proceed and requires every listed identity plus @azooz2003-bit to have signed.

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs a call Finished and held for a team design or product decision (see #13742 and the gallery in #15427)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants