Repository navigation
CJK characters not rendering properly #9410
Replies: 7 comments 19 replies
|
After completely exiting Ghostty and then re-entering it (without entering tmux), Chinese characters are rendered correctly, and rendering also works correctly after enter tmux. However, if I enter tmux first, then rendered in tmux, the Chinese fonts are rendered incorrectly. |
|
Use CJK fallback, seems be better. |
Possible root cause after some local testing:macOS's CTFontCreateForString is non-deterministic (Still not sure about it). Ghostty's CJK fallback path trusts and permanently caches its return value. When it occasionally returns AppleMyungjo (PostScript PCMyungjo, a Korean font) as the fallback for simplified-Chinese codepoints, those codepoints stay misrouted in the affected SharedGrid for its lifetime. Evidence:
My workaround for Simplified Chinese characters with font-codepoint-mapThis setting will force these Unicode characters to use the given font. |
|
I ran into the same issue: Chinese characters within a single line were split between Wawati TC and PingFang SC, while English remained normal. I documented my investigation in #14021, and the specific parser bug I found has now been fixed in #14022. A broader finding may be useful here. Ghostty has two related pieces of font-resolution state: the Collection of loaded faces and SharedGrid's per-codepoint cache. For a codepoint that has not been cached yet, Ghostty checks the existing faces in Collection order.
This can produce per-character mixing: covered characters use the earlier face, while glyph misses use another fallback. In my case, DC4 ( As @zeevenn noted above, configuring an explicit CJK fallback can substantially reduce the problem: font-family = "JetBrains Mono"
font-family = "PingFang SC"This places a known CJK face in Ghostty's configured fallback order instead of relying on CoreText to select one on demand. |
|
I encountered similar Chinese font rendering on Ghostty 1.3.1, macOS 26.7 (25G229). Chinese text looked unusually thin and serif-like while Latin text remained normal. No font settings were configured. Before applying a workaround, Adding the following mapping and correctly reloading the configuration with Cmd+Shift+, resolved the visible problem: font-codepoint-map = U+2E80-U+303F,U+3400-U+4DBF,U+4E00-U+9FFF,U+F900-U+FAFF,U+FF00-U+FFEF=PingFang SCI noticed this after updating Pi coding agent to 1.3.0, but have no evidence that Pi caused it. I do not have a reliable reproducer, and long-term recurrence has not been tested. AI assistance disclosure: Codex assisted with local diagnostics and drafting this report. |









Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey, today I was experimenting with a couple of new fonts until I noticed that the CJK characters are not rendering properly in Ghostty. I deleted the config to use the default settings, still it doesn't render in the correct way. It relates to #3499
All reactions