zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed doesn't show Japanese characters

Open stalkerg opened this issue 11 months ago • 10 comments

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

Image

If applicable, attach your Zed.log file to this issue.

Zed.log

stalkerg avatar Jan 23 '25 03:01 stalkerg

(ENG) Try to add the content to settings.json (日本語)この内容、settings.jsonに追加してみてください。

"ui_font_family": "Noto Sans"

TC999 avatar Jan 24 '25 09:01 TC999

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.

jansol avatar Jan 27 '25 10:01 jansol

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.

Image

stalkerg avatar Jan 28 '25 10:01 stalkerg

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.

Image

and seems like default value is 400 and this is why I can't see anything

stalkerg avatar Jan 28 '25 11:01 stalkerg

Sounds like your kana font does not have a "normal" weight then? Which font is that?

jansol avatar Jan 28 '25 14:01 jansol

@jansol any, I tried Noto Sans as well

stalkerg avatar Jan 29 '25 04:01 stalkerg

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?

stalkerg avatar Feb 03 '25 00:02 stalkerg

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.

jansol avatar Feb 03 '25 12:02 jansol

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).

stalkerg avatar Feb 13 '25 02:02 stalkerg

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

musjj avatar May 08 '25 10:05 musjj

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!

github-actions[bot] avatar Sep 10 '25 07:09 github-actions[bot]

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.

github-actions[bot] avatar Sep 17 '25 09:09 github-actions[bot]