Codex App code blocks use Japanese CJK fallback glyphs for Chinese text on Japanese macOS

Open Beginner friendly
#31,241 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
css, macos

Research direction

Locate the CSS font stack used for assistant-response code and pre elements, then reproduce the example on macOS with Japanese as the system locale. Verify that Simplified Chinese characters in fenced text blocks use Chinese glyph variants, while the existing monospace rendering remains intact.

Written by the indexing model from the issue text.

Description

app bug
What issue are you seeing?

Chinese text inside fenced code blocks, especially text code blocks in assistant responses, is rendered with Japanese CJK fallback glyphs on macOS when the system language/locale is Japanese.

Normal prose is less affected, but code blocks look visually wrong because the monospace font stack falls back to Japanese glyph variants for Chinese characters. This makes Chinese answers harder to read for users on Japanese macOS.

This seems related to, but more specific than, #21511 and #29827: this report is specifically about code/pre monospace fallback in assistant response Markdown.

What steps can reproduce the bug?
  1. Use Codex App on macOS with Japanese as the primary system language/locale.
  2. Ask Codex to respond with a fenced text code block containing Simplified Chinese.
  3. Observe Chinese characters inside the code block.

Example content:

```text
这是一个中文测试:门、关、说、直、海、骨、令
```
What is the expected behavior?

Chinese text in code blocks should use Chinese CJK glyph variants instead of Japanese glyph variants.

One possible fix would be to add explicit CJK Chinese fallback fonts before the final generic monospace fallback in the code/pre font stack, for example:

--font-mono-default:
  ui-monospace,
  "SFMono-Regular",
  "SF Mono",
  Menlo,
  Consolas,
  "Liberation Mono",
  "Noto Sans Mono CJK SC",
  "PingFang SC",
  "Hiragino Sans GB",
  monospace;

For Traditional Chinese users, PingFang TC / Noto Sans Mono CJK TC may also be worth considering.

What is the actual behavior?

Chinese characters in text fenced code blocks appear with Japanese glyph forms because the current monospace fallback chain appears to end at generic monospace, allowing Japanese CJK fonts to be selected first on Japanese macOS.

Environment
  • App: Codex desktop app
  • Platform: macOS
  • System language/locale: Japanese
  • Affected content: assistant response code blocks, especially fenced text blocks
  • Codex App version: 26.623.101652
Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.