Repository navigation
feat(web): terminal line height setting and centred terminal text - #182
Merged
Merged
Conversation
Terminal rows were fixed at 1.35x the font size and text was centred on the ink of "Mg", so text without descenders rode high in its row. Add a Terminal line height setting (stored as a percentage, default 135 so rows are unchanged) and centre the face's line box in the row, as xterm.js does. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Terminal rows were fixed at 1.35× the font size, and text was vertically centred on the ink of "Mg". The descender pulled that box down, so text without descenders, like digits, capitals and most prompt segments, sat high in its row. Powerline prompts showed it clearly: about 2px above the text and 6px below, where Cursor and VS Code centre it.
fontBoundingBoxAscent/Descent) in the row, as xterm.js does. If the browser doesn't report those metrics, it falls back to the old ink-based centring.line-height, it's a multiple of the font size. VS Code'sterminal.integrated.lineHeightmultiplies the font's natural line height instead; the user guide notes the difference.This is web and desktop. Mobile keeps its own terminal metrics. Docs updated:
docs/user/appearance.md,docs/fork-differences.md.Test:
renderer.test.tschecks the row height for a given line height and that the font's line box is centred in the row.🤖 Generated with Claude Code (Claude Opus 5.5)