Zed doesn't show Japanese characters
Check for existing issues
- [x] Completed
Describe the bug / provide steps to reproduce it
It shows empty spaces instead of symbols and breaks non-Unicode quotes, such as ", after this word; please check the screenshot.
Zed Version and System Specs
Zed: v0.170.1 (Zed) OS: Linux Wayland arch unknown Memory: 62.6 GiB Architecture: x86_64 GPU: Intel(R) Iris(R) Xe Graphics (RPL-P) || Intel open-source Mesa driver || Mesa 25.0.0-devel (git-e802793dd5)
If applicable, add screenshots or screencasts of the incorrect state / behavior
If applicable, attach your Zed.log file to this issue.
Zed.log
(ENG) Try to add the content to settings.json
(日本語)この内容、settings.jsonに追加してみてください。
"ui_font_family": "Noto Sans"
You also need to set "buffer_font_family" to something that contains those characters. Zed uses cosmic-text for text rendering and that does have some sort of fallback mechanism but it's unfortunately very opaque and there's no way to specify fallback fonts on Linux in Zed itself.
And of course make sure you have a font with those characters installed in the first place. Noto is one common option, and Source Han Mono is another one that's specifically meant for code.
Changing the font family doesn't work. On my Gentoo system is fine, but for Arch Linux, it doesn't work. After the latest update, I can see some symbols, but it only randomly seems like it became broken on Katakana and Hiragana, but if the line contains only alphabet and kanji, it's ok.
okey, I find a reason:
"buffer_font_weight": 400,
if I set 600, I can see hiragana and katakana, but the other font is bold.
and seems like default value is 400 and this is why I can't see anything
Sounds like your kana font does not have a "normal" weight then? Which font is that?
@jansol any, I tried Noto Sans as well
I tested it on different editors, such as VSCode and KWrite, and it shows the same font correctly. However, I can reproduce it only on Arch Linux (CachyOS). Did the Zed font render do something wrong or interpret some font configuration differently?
Did the Zed font render do something wrong or interpret some font configuration differently
The problem is quite possibly related to cosmic-text (which Zed uses to load & rasterize fonts), because that does AFAIK not interact with fontconfig at all (which is what most things on Linux traditionally use to handle font preferences and antialiasing settings etc). This has been a very common pain point with Zed on Linux.
It seems like cosmic-text provides some test apps; I will try them soon. I don't know why it's fine on Gentoo but has an issue on Arch (CachyOS).
So the fonts are basically rendered so thin that it's invisible? Might be related to my issue: https://github.com/zed-industries/zed/issues/30231
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
This issue was closed due to inactivity. If you're still experiencing this problem, please open a new issue with a link to this issue.