Skip to content

fix(ui): render workspace terminal with Canvas + CJK fonts#253

Open
maxx-masa wants to merge 1 commit into
TraderAlice:masterfrom
maxx-masa:feat/terminal-cjk-canvas-pr
Open

fix(ui): render workspace terminal with Canvas + CJK fonts#253
maxx-masa wants to merge 1 commit into
TraderAlice:masterfrom
maxx-masa:feat/terminal-cjk-canvas-pr

Conversation

@maxx-masa
Copy link
Copy Markdown

Summary

  • Switch the workspace terminal's xterm renderer from WebGL to Canvas (@xterm/addon-canvas) and add Noto Sans Mono CJK JP / Noto Sans CJK JP to the font stack.
  • The WebGL glyph atlas drew any styled CJK cell it couldn't rasterize (notably italic Japanese — Noto Sans Mono CJK JP has no italic face) as a solid black box. Canvas rasterizes each cell via 2D fillText, falling back through the browser font stack and synthesizing obliques, so bold/italic Japanese renders correctly — while staying much faster than the DOM renderer.

Test plan

  • Japanese text renders correctly (incl. bold/italic) in the workspace terminal — verified in the running app.
  • cd ui && npx tsc -b — not run locally: node_modules is out of sync with this branch's base (fork base = current upstream), and a full install would disrupt the local dev environment. The change is a minimal, standard renderer swap.

Boundary touch

None.

🤖 Generated with Claude Code

Switch the xterm renderer from WebGL to Canvas (@xterm/addon-canvas) and
add "Noto Sans Mono CJK JP" / "Noto Sans CJK JP" to the terminal font
stack so Japanese text renders correctly in workspace sessions.

The WebGL glyph atlas drew any styled CJK cell it could not rasterize
(notably italic Japanese — Noto Sans Mono CJK JP has no italic face) as a
solid black box. The Canvas renderer rasterizes each cell via 2D
fillText, falling back through the browser font stack and synthesizing
obliques, so bold/italic Japanese renders correctly — while staying much
faster than the DOM renderer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

@maxx-masa is attempting to deploy a commit to the luokerenx4's Team Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant