Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-English characters not displayed in Markdown links on Linux #16721

Open
1 task done
jsparkdev opened this issue Aug 23, 2024 · 7 comments
Open
1 task done

Non-English characters not displayed in Markdown links on Linux #16721

jsparkdev opened this issue Aug 23, 2024 · 7 comments
Labels
bug [core label] font Font feedback for readability, size, style, etc internationalization Feedback for human language support, translations, etc markdown Markdown markup support theme Feedback for theme configuration, accessibility, visual issues, etc

Comments

@jsparkdev
Copy link
Contributor

jsparkdev commented Aug 23, 2024

Check for existing issues

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

aa

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

@jsparkdev jsparkdev added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Aug 23, 2024
@notpeter notpeter added markdown Markdown markup support popovers Feedback for tooltips, syntax hints, info popups, toasts, etc font Font feedback for readability, size, style, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Sep 2, 2024
@notpeter

This comment was marked as outdated.

@notpeter notpeter added internationalization Feedback for human language support, translations, etc and removed popovers Feedback for tooltips, syntax hints, info popups, toasts, etc labels Sep 2, 2024
@jsparkdev

This comment was marked as outdated.

@notpeter

This comment was marked as outdated.

@jsparkdev
Copy link
Contributor Author

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)

@notpeter notpeter added the theme Feedback for theme configuration, accessibility, visual issues, etc label Sep 2, 2024
@notpeter
Copy link
Member

notpeter commented Sep 2, 2024

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.

Screenshot_20240902_182213

Temporary workaround:

  "experimental.theme_overrides": {
    "syntax": {
      "link_text": {
        "font_style": "normal"
      }
    }
  },

Screenshot_20240902_182321

@jsparkdev
Copy link
Contributor Author

@notpeter This method works! thank you

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
@mgsloan mgsloan self-assigned this Nov 6, 2024
@mgsloan
Copy link
Contributor

mgsloan commented Nov 7, 2024

Looks like the best place to fix this would be in the cosmic-text crate - see pop-os/cosmic-text#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

@mgsloan mgsloan removed their assignment Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] font Font feedback for readability, size, style, etc internationalization Feedback for human language support, translations, etc markdown Markdown markup support theme Feedback for theme configuration, accessibility, visual issues, etc
Projects
Development

No branches or pull requests

3 participants