You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the built-in terminal (Shell view), CJK characters (Japanese / Chinese / Korean)
are frequently rendered as solid black boxes (□ "tofu") instead of the real glyphs.
The same Japanese text renders correctly everywhere else in the app (chat panel,
sidebar, etc.), so this is specific to the xterm.js terminal — not the OS fonts.
The breakage is per-glyph / intermittent: most CJK in a line renders, but common
kana/kanji (e.g. ク, レ, 差, 正) randomly turn into boxes. That pattern is the
signature of a font-fallback / glyph-atlas problem in the WebGL renderer, not of
missing OS fonts (a real coverage gap would drop all CJK, not a random subset).
Steps to reproduce
Open the terminal and run a command that prints CJK, e.g. echo 日本語テスト 中文 한국어
(or run any CLI that emits Japanese/Chinese/Korean output).
Some CJK characters render as solid black boxes.
Screenshots
Environment
claudecodeui: main, self-hosted
Browser: Brave (Chromium) on Linux / Wayland
OS CJK fonts installed (noto-fonts-cjk); identical text renders fine in the
non-terminal UI, confirming the OS has the glyphs.
Root cause (from source)
Two compounding issues under src/components/shell/:
fontFamily has no CJK font — src/components/shell/constants/constants.ts:
Menlo / Monaco / Courier New have no CJK coverage, so CJK can only come from the
generic monospace fallback.
WebGL renderer is loaded unconditionally — src/components/shell/hooks/useShellTerminal.ts:
try{nextTerminal.loadAddon(newWebglAddon());}catch{console.warn('[Shell] WebGL renderer unavailable, using Canvas fallback');}Thexterm.jsWebGL(andcanvas)rendererrasterizesglyphsintoatextureatlasandhandles*fallback*glyphs(thosenotinthespecifiedfonts)poorly—CJKobtainedviathegeneric`monospace`fallbackfrequentlycomesoutasthemissing-glyphbox.TheDOMrendererdoesn't have this issue because it uses native browser text
rendering/fontfallback.
Suggested fix
Minimal: add cross-platform CJK monospace fonts to TERMINAL_OPTIONS.fontFamily,
giving the atlas an explicit CJK font to rasterize from:
Robust: make fontFamily user-configurable (relates to Feature/font customization #730) and/or expose an
option to disable the WebGL addon (fall back to the DOM renderer), which renders CJK
reliably even with an imperfect font stack.
Describe the bug
In the built-in terminal (Shell view), CJK characters (Japanese / Chinese / Korean)
are frequently rendered as solid black boxes (□ "tofu") instead of the real glyphs.
The same Japanese text renders correctly everywhere else in the app (chat panel,
sidebar, etc.), so this is specific to the xterm.js terminal — not the OS fonts.
The breakage is per-glyph / intermittent: most CJK in a line renders, but common
kana/kanji (e.g. ク, レ, 差, 正) randomly turn into boxes. That pattern is the
signature of a font-fallback / glyph-atlas problem in the WebGL renderer, not of
missing OS fonts (a real coverage gap would drop all CJK, not a random subset).
Steps to reproduce
echo 日本語テスト 中文 한국어(or run any CLI that emits Japanese/Chinese/Korean output).
Screenshots
Environment
main, self-hostednoto-fonts-cjk); identical text renders fine in thenon-terminal UI, confirming the OS has the glyphs.
Root cause (from source)
Two compounding issues under
src/components/shell/:fontFamilyhas no CJK font —src/components/shell/constants/constants.ts:Menlo / Monaco / Courier New have no CJK coverage, so CJK can only come from the
generic
monospacefallback.WebGL renderer is loaded unconditionally —
src/components/shell/hooks/useShellTerminal.ts:Suggested fix
TERMINAL_OPTIONS.fontFamily,giving the atlas an explicit CJK font to rasterize from:
fontFamilyuser-configurable (relates to Feature/font customization #730) and/or expose anoption to disable the WebGL addon (fall back to the DOM renderer), which renders CJK
reliably even with an imperfect font stack.