CJK font rendering regression on macOS 26.5: mixed sans-serif/serif styles within same text #12919
Unanswered
zayn-0101
asked this question in
Issue Triage
Replies: 1 comment
-
|
Duplicate of #9410? Note the recent insights in #9410 (comment) . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
CJK characters are rendered with mixed font styles — some glyphs appear in a sans-serif style (e.g. PingFang SC / Heiti SC) while others appear in a serif style (e.g. Songti SC) — within the same text block on macOS 26.5 (Tahoe). This appears to be a regression of the issue fixed in #811 (originally reported in #707).
Environment
renderer.generic.Renderer)Steps to reproduce
font-familyset)Expected behavior
All CJK characters should render consistently with the same font style. The system fallback font should be PingFang SC (sans-serif), and all characters should use it uniformly.
Actual behavior
Within the same line of pure Chinese text, different characters are rendered with visibly different font styles:
The pattern is not consistent and varies between terminal sessions.
Investigation
I performed extensive testing to rule out font resolution issues:
CoreText font resolution is 100% consistent: Tested all 20,992 characters in the CJK basic range (U+4E00-U+9FFF) — every single one resolves to
PingFangSC-RegularviaCTFontCreateForString. There is zero font fallback at the CoreText level.Terminal.app renders correctly: The same text displays with consistent font rendering in macOS Terminal.app, confirming this is a Ghostty-specific rendering issue.
Timeline confirms macOS 26.5 regression:
Workaround: Using
font-codepoint-mapto explicitly assign CJK ranges to a specific font (LXGW WenKai Mono, a Chinese-specific monospace font) resolves the issue:Root cause hypothesis
macOS 26.5 appears to have changed the font rendering behavior that the fix in #811 relied on. Since Ghostty's Metal renderer handles its own font fallback logic for CJK characters, changes in macOS's font rendering pipeline can cause the fallback to select different font variants (e.g., different weights or styles within the same font family) for different characters.
This is consistent with the original issue #707 where Ghostty's fallback was picking a
Heavyvariant by default, and with the comment from @danielwe on #8712 noting that "Font loading has a lot of state, and sometimes a restart of Ghostty seems to help."Related issues
Beta Was this translation helpful? Give feedback.
All reactions