Fix spaced-out terminal text on Windows (CJK-font cell sizing)#2287
Open
tomfluff wants to merge 1 commit into
Open
Fix spaced-out terminal text on Windows (CJK-font cell sizing)#2287tomfluff wants to merge 1 commit into
tomfluff wants to merge 1 commit into
Conversation
… the CJK fallbacks On Windows none of the Mac/Linux monospace fonts in the stack are installed, so the first font that resolves is Malgun Gothic (the Windows Korean UI font). xterm.js sizes its character cell from that font's advance width, and Malgun Gothic advances Latin glyphs in a full-width CJK cell — doubling every cell and rendering the whole terminal (and the sidepanel mono UI) as spaced-out text. Insert Consolas (present on every Windows install) and the Cascadia faces ahead of the CJK fonts in both the xterm fontFamily and the --font-mono CSS var. The CJK fonts stay last for actual CJK coverage. No bundled font, no user install needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKj8Nr8T4GvryTcWBJRMyC
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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
On Windows, the sidebar terminal (and the mono-font sidepanel UI) renders every character spaced out —
C l a u d e C o d einstead ofClaude Code. Screenshot of the symptom on a clean Windows 11 install: each glyph sits in a double-wide cell.Cause
The xterm
fontFamilyand the--font-monoCSS var list only Mac/Linux monospace fonts (JetBrains Mono,SF Mono,Menlo,Fira Code,Cascadia Code) before the CJK fallbacks (Noto Sans Mono CJK KR,Malgun Gothic). None of the leading fonts ship with Windows, so the first font that actually resolves is Malgun Gothic — the Windows Korean UI font, present on every install. xterm.js sizes its character cell from the resolved font's advance width, and Malgun Gothic advances Latin glyphs in a full-width CJK cell, doubling every cell.Fix
Insert
Consolas(present on every Windows install) plus the Cascadia faces before the CJK fonts in both places. The CJK fonts stay last for genuine CJK glyph coverage. No bundled font, no user install.extension/sidepanel-terminal.js— xtermfontFamilyextension/sidepanel.css—--font-monoTwo lines of font-stack, verified on the affected Windows machine.
🤖 Generated with Claude Code