Repository navigation
Conversation
The Ghostty canvas renderer sizes rows at fontSize * 1.35, which looks looser than Ghostty and cannot be changed. Add a client setting that defaults to 1.35, multiplies the font size for row height, and never shrinks a row below the measured glyph. Grok 4.7 via Cursor Co-authored-by: Ben Bieker <ben@bieker.ninja>
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.
Problem
Since the terminal moved to the libghostty canvas renderer (pingdotgg#4860), each row is
round(fontSize * 1.35)tall. That is looser than Ghostty at the same font and size, and there is no control for it. Before that renderer, pingdotgg#3096 set xterm.jslineHeightto 1 so row gaps would not break QR codes (pingdotgg#336).Change
Settings → Appearance → Terminal line height is a multiplier from 1 to 2. The default is 1.35, so current terminals stay as they are. Row height is
max(round(fontSize × multiplier), ceil(glyphHeight)), so a row never shrinks below the measured glyph. Changing it reflows the open terminal the same way font size does. Web and desktop share the client setting. Mobile keeps its own terminal text settings.The settings preview and the provider sign-in terminal use the same pitch. Restore defaults includes the new field.
Scope and approval
This is a configuration option for the existing terminal. The capability is the integrated terminal's row pitch, previously fixed at 1.35 after pingdotgg#4860 and previously set to 1 for xterm.js in pingdotgg#3096. The option only changes that multiplier. The default is unchanged, and it does not add a workflow. Discussion: pingdotgg#26988.
Verification
Focused tests cover the default and decode bounds, cell height at 1, 1.2, 1.35, and 2, clamping below the glyph and outside 1–2, grid row count, and live surface reflow.
vp test run packages/contracts/src/settings.test.ts apps/web/src/terminal/ghostty/renderer.test.ts apps/web/src/components/settings/SettingsPanels.logic.test.ts— 3 files, 35 passed.vp test run apps/web/src/terminal/ghostty/surface.test.ts -t "reflows row height"— 1 passed.vp run check:changed— format, lint, knip, typecheck (32 packages), tests (8 files, 91 passed), and React compiler passed.Manual check in the web app, DejaVu Sans Mono at 13px (Menlo is not installed on this machine). The same terminal session ran
bash /tmp/qr-line-height.sh, which prints a digit/M/i ruler andqrencode -t ansiutf8of pingdotgg#26988. The ruler columns line up. The QR is intact at 1.35, 1.20, and 1.00. At 1.35 and 1.20 the rows are separated and the code does not scan. At 1.00 the rows meet, and the code scans back to that discussion URL.Settings, DejaVu Sans Mono 13px, line height 1.35:
Terminal line height setting at 1.35 with DejaVu Sans Mono 13px
Terminal at 1.35 (default):
Terminal at line height 1.35 with a QR code in DejaVu Sans Mono
Terminal at 1.20:
Terminal at line height 1.20 with a QR code in DejaVu Sans Mono
Terminal at 1.00:
Terminal at line height 1.00 with a QR code in DejaVu Sans Mono
Not checked: the Ghostty app side by side, the Electron window (the web UI it wraps was checked), and mobile, which does not use this setting.
Grok 4.7 via Cursor
To show artifacts inline, enable in settings.