| … | … | @@ -780,6 +785,15 @@ export class GhosttyTerminalSurface { | |
| 781 | 786 | if (this.disposed) return; | |
| 782 | 787 | const fontSize = terminalFontSize(font.size); | |
| 788 | + | const cellHeightAdjust = resolveTerminalCellHeightAdjust(font.cellHeightAdjust); | |
| 789 | + | if (font.family === this.requestedFontFamily && fontSize === this.fontSize) { | |
🟡 Medium ghostty/surface.ts:789
When a new request returns to the committed font family and size, this branch leaves an earlier font load active, so that stale request later overwrites the latest setting and leaves the terminal with the wrong font/grid. Invalidate any pending load before returning, and apply the latest cell-height adjustment if a load was superseded.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/terminal/ghostty/surface.ts around line 789: |
| 2 | |
| 3 | When a new request returns to the committed font family and size, this branch leaves an earlier font load active, so that stale request later overwrites the latest setting and leaves the terminal with the wrong font/grid. Invalidate any pending load before returning, and apply the latest cell-height adjustment if a load was superseded. |
Fixed in b9da9e50cf99e46cf85a88651ede0f58b007aeb1. Returning to the committed font now invalidates any pending load and immediately applies the latest cell-height adjustment. Regression tests cover returning with both 0% and 20% adjustments; all 38 focused tests and changed-file checks pass.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
| … | … | @@ -84,22 +90,50 @@ function fontForCell(cell: GhosttyCell, fontSize: number, fontFamily: string): s | |
| 124 | + | const natural = Math.max(1, Math.round(fontAscent + fontDescent)); | |
| 125 | + | const percent = resolveTerminalCellHeightAdjust(cellHeightAdjust); | |
| 126 | + | const adjusted = Math.max(1, Math.round((natural * (100 + percent)) / 100)); | |
| 127 | + | const height = Math.max(adjusted, Math.ceil(glyphHeight)); | |
🟡 Medium ghostty/renderer.ts:127
Negative cellHeightAdjust values can make metrics.height smaller than the font bounds, so renderGhosttySnapshot clips taller glyphs such as accented capitals and fallback characters. The Mg ink bounds only cover that sample; keep the font bounding-box height as the minimum when shrinking.
| 1 | const height = Math.max(adjusted, Math.ceil(glyphHeight), Math.ceil(fontAscent + fontDescent)); |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/terminal/ghostty/renderer.ts around line 127: |
| 2 | |
| 3 | Negative `cellHeightAdjust` values can make `metrics.height` smaller than the font bounds, so `renderGhosttySnapshot` clips taller glyphs such as accented capitals and fallback characters. The `Mg` ink bounds only cover that sample; keep the font bounding-box height as the minimum when shrinking. |
Fixed in b9da9e50cf99e46cf85a88651ede0f58b007aeb1. Row height is now clamped to the full font bounding box as well as the measured glyph bounds. Measurement includes accented glyphs, and baselines retain fractional precision. Regression coverage verifies the bounds; documentation explains that negative adjustments stop at the safe minimum. The 0% default remains pending the separate maintainer decision.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.