Request better Arabic font for Ubuntu 20.04

As regards the gnome-terminal/monospace problem I compared with /etc/fonts/conf.avail/69-language-selector-zh-cn.conf for Simplified Chinese, and which I used as a model for the Arabic equivalent.

In that case fontconfig behaves similarly, i.e. the font stated for sans-serif (Noto Sans CJK SC) is given high precedence also for monospace (and for serif).

$ LC_CTYPE=zh_CN.UTF-8 fc-match -a monospace | head -6
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
NotoSansCJK-Regular.ttc: "Noto Sans Mono CJK SC" "Regular"
NotoSansCJK-Bold.ttc: "Noto Sans Mono CJK SC" "Bold"
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"
NotoSansCJK-Bold.ttc: "Noto Sans CJK SC" "Bold"

I’m not aware of any complaints from Chinese users about this, though.

One thought is that DejaVu Sans Mono may not cover all the glyphs for Arabic, and that fontconfig falls back to the next font in the list for certain glyphs. The reason why that does not happen for Chinese would then be that Noto Sans Mono CJK SC is complete enough.

Does this reasoning make sense?

I made a new attempt to fix it so also monospace works as intended. This time I uploaded to this PPA:

https://launchpad.net/~gunnarhj/+archive/ubuntu/language-selector

These are the changes:

  • Renamed the .conf to 56-language-selector-ar.conf
  • Dropped binding="strong"
  • Dropped the monospace section

Then I browsed ar.wikipedia.org and the inspector indicated that Noto Naskh Arabic UI was in use. But I’m certainly not sure.

So please install language-selector-common and language-selector-gnome from the PPA on a groovy installation, and test both sans-serif and monospace.

@gunnarhj It does, also I did some interesting test yesterday, I used a default installation of Ubuntu 20.04, and fonts on the terminal were a mess!
Probably most users don’t care about the terminal, or maybe if they care then they’re competent enough to fix it (by going to settings and overriding system’s default mono font).

Update, it is a gnome issue, here is a test with different number of terminals (kitty, xterm, konsole, terminator):

Hi @gunnarhj

Unfortunately, that made no difference to the terminal, however rendering outside it is correct:

@gunnarhj
This is my last post according to Discourse, I’m being blocked for sending too much replies exceeding “new account” limits, can you please help approve it or something?

I can only reply trough edits :smiley:

@ian-weisser: @munadi is a valuable contributor wrt our efforts to improve the fonts for Arabic scripts. Can you please raise his privileges somehow to work around that new account limit.

That may be the case. Also, some Arabic users prefer English in terminal anyway. This topic comes to mind.

That was useful input. gnome-terminal has also other issues with non-latin scripts, e.g. some Indian scripts.

Ok. Still some progress (i.e. it works without binding="strong" for sans-serif).

As a last attempt I uploaded a new variant to the PPA where I added back the monospace section including binding="strong" for monospace only. Any chance you can install that variant and see if it helps wrt gnome-terminal?

(If you haven’t yet got permission to post here, please feel free to send me an email to gunnarhj@ubuntu.com.)

Trying the latest PPA version didn’t change anything here.

As @mhsabbagh said, no different, gnome-terminal still broken.

Updated: No, Kitty is broken, but in a different way.

Regarding the original topic away from terminal issue… Any chance someone can pull a recent version from Noto fonts from GitHub and push them both to 20.04 and 20.10? So that we can see the final fonts version in their current status.

@mhsabbagh, @munadi: Thanks for your feedback on my latest attempt via the PPA. Then I’m going to give up for now as regards the gnome-terminal behavior, and assume it’s a gnome-terminal bug.

I will upload the most sensible variant to groovy (with Noto Naskh Arabic UI for sans-serif), and later upload the same config to focal. Hopefully we are all agreed that this is at least an improvement compared to the previous DejaVu font, despite of the issues which may remain.

That would indeed be interesting to see, given the observations you reported previously, but it will need to be a project for Ubuntu 21.04. Ubuntu’s policy for updating stable releases would probably not allow us to backport new versions of the fonts-noto-* packages to 20.04 and 20.10. The first step will be to ask the Debian maintainer to update the packages in Debian, and then they will be synced to the development version for 21.04. A wishlist Debian bug might speed up the process.

For me it’s a tremendous improvement, thank for all the hard work!

It is not the end, I’ll follow up to see how Noto+Arabic will progress in the future, I didn’t even know bugs in fonts exists, I always thought it was the renderrer responsible for any bug :smiley:

I will upload the most sensible variant to groovy (with Noto Naskh Arabic UI for sans-serif), and later upload the same config to focal. Hopefully we are all agreed that this is at least an improvement compared to the previous DejaVu font, despite of the issues which may remain.

No. Noto Naskh is an absolutely horrible font and the old DejaVu is 100% better than it, simply because it doesn’t have any bugs which it has, regardless of the font beauty itself or not.

Noto Naksh breaks Twitter, Facebook, YouTube and many other websites in displaying many Arabic letters (E.g ي if it is in the first/last line of texts). It also causes large context menu items when compared to all the other fonts. It also prevents the possibility of reading an Arabic text correctly at all since it doesn’t display the Arabic diacritics and hence as an Arabic reader that prevents me from reading Arabic.

Using Noto Naksh absolutely breaks Arabic on Ubuntu. Use a hundred Dejavu font everywhere but don’t use Naskh.

you can uninstall fonts-noto-core then install the fonts manually but make should you are installing it for System not user only

then restart after that you will get the newest fonts

I am not asking that, I already said in the post that I have applied the fonts myself and I even posted screenshots more than a week ago. I am asking Ubuntu itself to grab a new version rather then the old one in official repositories. But as explained, looks like we’ll have to fill a bug with Debian to get the process faster.

I installed it manually and can’t see any difference
Can you provide us with an example?

I already did, check the previous posts.

Oh and by the way compile the fonts from the GitHub rather than using the already packaged ones by Google.

But that’s not our issue now.

Can you provide screenshot for the issue before and after change the font to last one from Github
and write the Example script that show all the issues :smiley:

I exactly did that (away from the script part).

@gunnarhj I would like to request that we use the Noto Sans Arabic font (Not the UI version, the normal one) as a middle resort. Although the font suffers from the two bugs I reported, it remains the better alternative than Naskh (Way, way way more).

I like the regular version rather then the UI version because the latter is too condensed; Especially noticeable in displaying the ي letter in Arabic. Here are two screenshots.

Noto Sans Arabic
Imgur

Noto Sans Arabic UI
Imgur

We can apply the font on 20.04 and 20.10, and then fix the bugs upstream and expect the updates to land gradually in Ubuntu. But Naskh is absolutely broken by design and there’s no way to fix it.

Noto Sans Arabic UI is good for UI but not for read
the issue we cannot make Noto Sans Arabic UI for UI and Noto Sans Arabic for subjects etc…
we should choose one for all
Noto Sans Arabic is so huge for UI
see Request better Arabic font for Ubuntu 20.04