fix: add CJK font fallback for terminal#4
Open
SamCuipogobongo wants to merge 1 commit intodreamlonglll:mainfrom
Open
fix: add CJK font fallback for terminal#4SamCuipogobongo wants to merge 1 commit intodreamlonglll:mainfrom
SamCuipogobongo wants to merge 1 commit intodreamlonglll:mainfrom
Conversation
Add 'Sarasa Term SC' (等宽 CJK 字体) to the fontFamily fallback chain. Without a proper monospace CJK font, Chinese characters render as garbled glyphs in the WebGL renderer because the default monospace fonts lack CJK coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
感谢你的贡献!CJK 字体回退的修复方向是正确的,注释从"Canvas"改为"DOM"也是准确的(项目没有 不过这个 PR 有一个比较大的问题:分支基于旧版本 (v0.1.9),没有 rebase 到当前 main (v0.2.2),导致合并后会回退最近多个版本的功能,包括:
请基于最新的 另外一个小建议: fontFamily: "'JetBrains Mono', 'Cascadia Code', Consolas, 'Sarasa Term SC', 'Microsoft YaHei Mono', 'Noto Sans Mono CJK SC', monospace"这样在用户没有安装更纱黑体的情况下也能有更好的 CJK 字符显示效果。期待你的更新 🙌 |
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
Sarasa Term SC(更纱黑体) to thefontFamilyfallback chain in xterm.js terminal configTest plan
Sarasa Term SCfont (e.g.brew install --cask font-sarasa-gothic)🤖 Generated with Claude Code