fix: terminal font rendering improvements#175
Open
wosuxiongmao wants to merge 4 commits intoDeadWaveWave:mainfrom
Open
fix: terminal font rendering improvements#175wosuxiongmao wants to merge 4 commits intoDeadWaveWave:mainfrom
wosuxiongmao wants to merge 4 commits intoDeadWaveWave:mainfrom
Conversation
At 125% DPI (devicePixelRatio=1.25), xterm DOM renderer positions character spans at fractional pixel values, causing browser subpixel antialiasing to blur text. Add CSS font-smoothing rules to force grayscale antialiasing and geometric precision rendering for crisper terminal text. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…settled The single requestAnimationFrame in scheduleWebglPixelSnapping could fire before the terminal canvas DOM layout was fully computed on initial render, causing incorrect pixel snapping offsets. Using double-rAF ensures the layout has settled before applying the transform. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously fontSize was omitted from new Terminal() options, causing xterm to use its default of 15px before useTerminalAppearanceSync could apply the user-configured terminalFontSize. This resulted in Codex terminals rendering at 15px instead of the configured size (e.g. 13px) on Windows with fractional DPI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…or profile - Round width, height, and translate offsets to integer pixels in nodeFrameStyle to eliminate sub-pixel blur from fractional transforms. - Split font-smoothing CSS so non-Windows keeps forced antialiased while Windows uses its native ClearType subpixel rendering. - Set data-cove-platform on <html> from renderer to drive the CSS selectors. - Add force-color-profile=srgb Chromium switch to reduce color-space edge artifacts.
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.
Summary
Test plan