[BUG] Persian/Arabic/Hebrew text renders with wrong font and no bidirectional layout on Windows
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Right-to-left text (Persian, Arabic, Hebrew, Urdu) is rendered incorrectly in two independent ways. Both are reproducible on a clean install and neither is user-fixable.
1. No bidirectional layout. Rendered message content has no RTL handling whatsoever. Searching the entire application bundle (resources/app.asar) for bidi patterns returns almost nothing:
| Pattern | Occurrences in app.asar |
| --- | --- |
| unicode-bidi: plaintext | 2 |
| unicode-bidi: isolate | 1 |
| direction: rtl | 0 |
| direction: ltr | 0 |
| dir: "auto" | 1 |
Consequences: Persian paragraphs are left-aligned; sentence-final punctuation (. ؟ ! :) is displaced to the wrong visual end of the line; list markers sit on the wrong side; and — most seriously — mixed-direction runs are mis-ordered. A Persian sentence containing a Latin identifier, file path, or version number renders with the segments in the wrong visual sequence, which changes what the sentence appears to say. For a coding tool, mixed Persian/Latin text is the normal case, not an edge case.
2. Wrong font for Arabic script. The font stack declared in the bundle is:
font-family: Anthropic Sans, ui-sans-serif, system-ui, sans-serif;
Anthropic Sans has no Arabic-script glyphs, so Persian falls through to system-ui — Segoe UI on Windows. I verified this by measuring rendered text width. Test string سلام دنیا این یک آزمایش فونت فارسی است at font-size: 64px, measured via getBoundingClientRect().width in headless Chromium (Edge --headless=new) on the same machine with the same installed fonts, which reproduces the same Blink font-resolution rules the Electron app uses:
| Font stack | Rendered width |
| --- | --- |
| App stack (Anthropic Sans, ui-sans-serif, system-ui, sans-serif) | 1122.03 px |
| system-ui | 1122.03 px |
| 'Segoe UI' | 1122.03 px ← identical to the app stack |
| ui-sans-serif | 897.69 px |
| sans-serif | 910.16 px |
| Vazirmatn | 1096.44 px |
| Tahoma | 1193.06 px |
Segoe UI's Arabic coverage exists but is not designed for Persian at reading sizes — thin letterforms, poor dot and descender placement, and vertical metrics that fight the Latin text it sits beside.
Why users cannot work around either problem:
- No font or direction setting is exposed. I searched the bundle for
fontFamily,fontSize,customCss,customCSS,userStyles,injectCSS— none exist. Nothing relevant in~/.claude/settings.jsonor%LOCALAPPDATA%\Claude-3p\config.jsoneither. - Chromium per-script font preferences have no effect. I tested
webkit.webprefs.fonts.{standard,sansserif,serif,fixed}.Arab = "Vazirmatn"in an isolated user-data-dir; measured widths were byte-identical with and without it, because the stack resolves throughsystem-ui, which those prefs do not govern. - Installing a good Persian font is not sufficient. Vazirmatn v33.003 is installed and verified visible to both GDI and Chromium on this machine (it measures 1096.44 px above, distinct from every other row). The app still cannot reach it.
- On Windows the app now ships only as an MSIX package under
WindowsApps, so the community CSS-injection patcher that works on macOS explicitly refuses to run. Windows RTL users have no workaround at all.
What Should Happen?
Persian/Arabic/Hebrew text should render right-aligned, with correct bidirectional ordering of mixed-direction content, in a typeface designed for the script.
Suggested fixes, in order of impact-to-effort:
Layout (the more severe problem, and a small change):
- Set
dir="auto"on the container for each rendered message block, and on each block-level element inside rendered markdown (paragraphs, list items, table cells, blockquotes).dir="auto"picks base direction from the first strong directional character — exactly the right heuristic here, and it needs no user setting. - Or apply
unicode-bidi: plaintextto those blocks; the codebase already uses this pattern in two places. - Use
text-align: startrather thanleftso RTL blocks align correctly. - Apply the same treatment to the composer input, code block captions, tool-call summaries, and file/diff headers.
Font:
- Add an Arabic-capable face ahead of
system-uiin the stack. A bundled webfont would fix all platforms at once and keep rendering consistent — Vazirmatn (SIL Open Font License) is the de facto standard for Persian UI text. - Or extend
Anthropic Sanswith Arabic-script coverage. - Or, at minimum, expose a user-configurable font-family override in settings. That would also help users with dyslexia-friendly font needs and other accessibility requirements.
Error Messages/Logs
Not applicable — this is a rendering defect, no errors are emitted.
Steps to Reproduce
- Open Claude Code in the Claude Desktop app on Windows (or any surface using the same renderer).
- Send this prompt:
لطفاً یک جمله فارسی بنویس که داخلش عبارت انگلیسی package.json و عدد ۱۲۳ باشد.
- Observe the rendered response:
- It is left-aligned rather than right-aligned.
- Sentence-final punctuation appears at the wrong visual end of the line.
package.jsonand the numerals are positioned incorrectly relative to the surrounding Persian text.- The text is rendered in Segoe UI, not a Persian-designed typeface.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.222
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Not a terminal session — this is Claude Code running inside the Claude Desktop app, which is why "Other" is selected above. The rendering path is the desktop app's markdown renderer, not a TTY.
Environment:
| | |
| --- | --- |
| App | Claude Desktop 1.26832.0.0 |
| Package | MSIX / AppX — Claude_1.26832.0.0_arm64__pzs8sxrjxfjjc |
| Install path | C:\Program Files\WindowsApps\Claude_1.26832.0.0_arm64__pzs8sxrjxfjjc\app |
| Bundled Claude Code | 2.1.222 |
| OS | Windows 11 Pro, build 10.0.26200 |
| Architecture | ARM64 |
| Display scale | 150% |
This affects Persian, Arabic, Hebrew, Urdu, Pashto and Kurdish users collectively numbering in the hundreds of millions. The dir="auto" change alone would resolve the majority of the problem at low risk and with no new user-facing setting.
Happy to test a build and provide before/after measurements.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗