Skip to content

Add font family, letter spacing and line height settings - #18

Open
zarv1k wants to merge 1 commit into
cloudcli-ai:mainfrom
zarv1k:feat/font-settings
Open

zarv1k wants to merge 1 commit into
cloudcli-ai:mainfrom
zarv1k:feat/font-settings

Conversation

@zarv1k

@zarv1k zarv1k commented Oct 2, 2026

Copy link
Copy Markdown

Summary

The settings popover only exposes font size, so using an installed programming font (or loosening dense glyphs) meant hand-editing localStorage. This adds three settings next to Font Size, applied live to every tab and persisted with the other prefs:

  • Font Family — a picker with common monospace presets (JetBrains Mono, Fira Code, SF Mono / Menlo, Cascadia / Consolas, Ubuntu Mono, DejaVu Sans Mono). Each preset keeps the CJK and emoji fallbacks, so picking a family never loses those glyphs. A family stored outside the presets shows up as Custom instead of the picker misreporting it as Default.
  • Letter Spacing — −2 to 4 px in whole pixels, which is what xterm documents for letterSpacing.
  • Line Height — 1.00 to 2.00 in 0.05 steps. The lower bound matters: xterm throws on lineHeight < 1.

Stored values go through the same validation as the existing prefs in loadPrefs() (clamped; invalid values fall back to the defaults), and the README settings table is updated.

Testing

  • npm run typecheck and npm run build pass.
  • npm test: resize reaches the PTY fails, and a dropped connection keeps the shell alive… fails intermittently, on unmodified main too in my environment (Debian 13, Node 24). This change only touches the frontend.

The settings popover only exposed font size, so switching to an installed
programming font meant hand-editing localStorage. Add a font family picker
with common monospace presets (each keeping CJK and emoji fallbacks) plus
letter spacing and line height steppers, applied live to every tab.

Line height is clamped to at least 1 because xterm throws below that, and
letter spacing is kept to whole pixels as xterm documents. A family stored
outside the presets shows up as "Custom" instead of being misreported.
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