zed
zed copied to clipboard
Non-English characters not displayed in Markdown links on Linux
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
As shown in the following image, characters such as Korean, Japanese, Chinese, and Arabic are not displayed correctly in the Linux Markdown link.
Environment
Zed: v0.150.3 (Preview) OS: Linux Mint 22 Memory: 2451MiB / 31988MiB Architecture: x86_64 GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
Can you provide an example block of text to help reproduce this issue?
@notpeter Does this image not explain it well enough? If so, I'm not sure what more information is needed. π
Was looking for an example of a plaintext string that I could copy paste from the github issue into my editor that triggers the issue. I don't have IME configured on my Linux machine and wanted to make sure I had a test case which triggered the issue. Something like:
[hello μλ
νμΈμ δ½ ε₯½ Ω
Ψ±ΨΨ¨ΩΨ§](https://zed.dev)
Oh, I see! Is it okay to provide a string like this?
The three strings below are Korean, Chinese, and Japanese, respectively.
[μλ
νμΈμ](https://zed.dev)
[δ½ ε₯½](https://zed.dev)
[γγγ«γ‘γ―](https://zed.dev)
This works correctly on MacOS, but I am able to reproduce on Linux (Ubuntu 24):
- Works in normal code.
- Works in the markdown preview.
- Broken inside the [brackets] of a link in markdown.
Temporary workaround:
"experimental.theme_overrides": {
"syntax": {
"link_text": {
"font_style": "normal"
}
}
},
@notpeter This method works! thank you
Looks like the best place to fix this would be in the cosmic-text crate - see https://github.com/pop-os/cosmic-text/issues/114
Could probably be addressed on the Zed side here, but would be much cleaner to do this via augmenting cosmic-text's existing fallback logic. Specifically see use of FontFallbackIter in cosmic-text here
I'm going this as stale as I believe it has been fixed by a cosmic-text upgrade.
If you're still seeing this please comment and I'm happy to reopen.
I encounter the same problem when using Chinese characters in square brackets in the Markdown editor, while other cases work fine.
System info: