8000 Arabic Font Rendering Issue · Issue #439 · pop-os/cosmic-term · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Arabic Font Rendering Issue #439

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

Open
Majoramari opened this issue Feb 26, 2025 · 4 comments
Open

Arabic Font Rendering Issue #439

Majoramari opened this issue Feb 26, 2025 · 4 comments

Comments

@Majoramari
Copy link

Thanks for supporting RTL. You are one of the few terminals that support RTL, but I have encountered an issue that I don't know how to solve. The AR font looks awful, and I'm not sure how to fix it exactly. You can see the difference in the following image:

Image

@MoSal
Copy link
Contributor
MoSal commented Feb 26, 2025

Make sure you have a monospace font with Arabic support installed. DejaVu Sans Mono is a common one. Kawkab Mono is one which is specifically tailored to Arabic.

@Majoramari
Copy link
Author

Make sure you have a monospace font with Arabic support installed. DejaVu Sans Mono is a common choice, while Kawkab Mono is specifically tailored for Arabic.

Thanks for your reply! I have both of them installed.

Here's a comparison with Konsole. While it's not perfect, it's somewhat better and easier to read.

Image

@MoSal
Copy link
Contributor
MoSal commented Feb 28, 2025

Actually there appears to be a bug in font selection that may have not been there in the past. The font fallback process is still kicking in even if the selected/configured font supports all required glyphs. So maybe there is a "bad" mono font with Arabic support that is being used, even if a "good" font is explicitly selected.

In any case, you can run cosmic-term like this:

RUST_LOG=cosmic_text=trace cosmic-term

And look for lines like:

[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'IBM Plex Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Inconsolata'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Roboto Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrains Mono NL'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Fira Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Fira Code'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'PowerlineSymbols'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'IBM Plex Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Unifont-JP'

The last font in that sequence would be the one selected as fallback, and thus could be the "bad" one.

@Majoramari
Copy link
Author

Actually there appears to be a bug in font selection that may have not been there in the past. The font fallback process is still kicking in even if the selected/configured font supports all required glyphs. So maybe there is a "bad" mono font with Arabic support that is being used, even if a "good" font is explicitly selected.

In any case, you can run cosmic-term like this:

RUST_LOG=cosmic_text=trace cosmic-term

And look for lines like:

[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'IBM Plex Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Inconsolata'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Roboto Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrains Mono NL'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Fira Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Fira Code'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'PowerlineSymbols'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'IBM Plex Mono'
[2025-02-28T08:36:50Z TRACE cosmic_text::shape] Evaluating fallback with font 'Unifont-JP'

The last font in that sequence would be the one selected as fallback, and thus could be the "bad" one.

Well I tried the command you send me and I got this (I got longer output but I just pasted the fallbacks to not bloat the issue):

[2025-03-27T20:47:19Z TRACE cosmic_text::shape]       Run []: '\U0001f54c'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'DejaVu Sans Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Kawkab Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Cousine'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Nimbus Mono PS'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Liberation Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Kawkab Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCodeLigatures Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCodeLigatures Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'SourceCodeVF'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCodeLigatures Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCodeLigatures Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCodeLigatures Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'FreeMono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Hack'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'DejaVu Sans Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Kawkab Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCodeLigatures Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'ComicCode Nerd Font'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Cousine'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Nimbus Mono PS'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Liberation Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMonoNL Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'JetBrainsMono Nerd Font Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Source Code Pro'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Noto Sans'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'DejaVu Sans'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'FreeSans'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Noto Sans Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'DejaVu Sans Mono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'FreeMono'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Noto Sans Symbols'
[2025-03-27T20:47:19Z DEBUG cosmic_text::font::fallback] failed to find family 'Noto Sans Symbols2'
[2025-03-27T20:47:19Z TRACE cosmic_text::shape] Evaluating fallback with font 'Noto Color Emoji'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0