Add a crisp font-rendering option for macOS terminals - #335625
Draft
Anthony Kim (anthonykim1) wants to merge 1 commit into
Draft
Add a crisp font-rendering option for macOS terminals#335625Anthony Kim (anthonykim1) wants to merge 1 commit into
Anthony Kim (anthonykim1) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Anthony Kim (anthonykim1)
September 11, 2026 05:20
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The platform-gated configuration contract is inaccurate, and detached forwarding is not actually covered by the new test.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/terminal/common/terminal.ts — Model the excluded setting as optional |
|
src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts — Exercise detached configuration forwarding |
What changed in this PR
Adds an opt-in crisp font-rendering mode for macOS terminals while preserving existing defaults.
Changes:
- Registers
terminal.integrated.fontRendering. - Applies smoothing consistently to standard, detached, and sticky-scroll terminals.
- Refreshes glyph caches and adds targeted tests.
| File | Description |
|---|---|
terminalStickyScrollOverlay.ts |
Applies rendering policy to sticky scroll. |
xtermTerminal.test.ts |
Tests rendering configuration behavior. |
terminalConfiguration.ts |
Registers the setting. |
terminal.ts (workbench) |
Adds the configuration property. |
xtermTerminal.ts |
Applies rendering during attachment and updates. |
terminalFontRendering.ts |
Implements class updates and atlas refresh. |
terminalFontRendering.css |
Defines HiDPI smoothing behavior. |
terminal.ts (platform) |
Adds the setting identifier. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| drawBoldTextInBrightColors: boolean; | ||
| fastScrollSensitivity: number; | ||
| fontFamily: string; | ||
| fontRendering: 'inherit' | 'crisp'; |
| }, undefined)); | ||
| attach(terminal); | ||
| await setFontRendering('crisp'); | ||
| terminal.updateConfig(); |
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.integrated.fontRenderingon macOS withinherit(default) andcrisp.The rendering comparison pointed to font-smoothing policy as the significant appearance difference. This is an opt-in style preference, not a new renderer or an increase in resolution. The separate xterm alpha-blending experiment, texture-filtering changes, native-renderer ideas, and demo color overrides are intentionally outside this PR; no xterm dependency or source changes are required.
Validation
GOMAXPROCS=2 npm run transpile-clientGOMAXPROCS=2 npm run typecheck-clientVSCODE_SKIP_PRELAUNCH=1 ./scripts/test.sh --run vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test— 24 passing.terminalFontRendering.css.Manual review cases
inheritandcrispusing the same font and theme in panel/editor terminals. Check that surrounding workbench text and terminal colors do not change.crispshould not force pixel antialiasing below the existing HiDPI threshold.Inspirations from:
workbench.fontAliasingCSS, applied to the terminal element rather than the entire workbench.XtermTerminal.forceRedraw. Cached glyphs need to be regenerated after changing their inherited rendering policy.TerminalService._ensureDetachedTerminalListeners, without introducing another listener for every detached instance.CanvasRenderingContext2D::ResolveFont, which resolves the font using the canvas element's computed style, and xterm'sTextureAtlas._drawToCache, which attaches the raster canvas to the terminal.