Request better Arabic font for Ubuntu 20.04

Hey! FYI, I have found Arabic/Urdu fonts on KDE (read: Kubuntu) to be much better than Ubuntu. I have never found the reason. Maybe I should also try to uninstall dejavu font and see if that helps me as well.

Also: It’s been quite a few years I saw your comment anywhere. Hope you are doing well :wink:

Sure, that’s a way. But that has significant side effects, including a need to also uninstall the ubuntu-desktop meta package, which is not recommended.

For an Arabic speaking user there is a simpler trick to work around the need to switch to Arabic as display language:

You can simply open the /etc/default/locale file for editing and add the line:

LC_CTYPE=ar_EG.UTF-8

(or whichever Arabic locale is generated on your system) and then reboot.

I just checked my Kubuntu install in a VM, and it looks like they install the fonts-noto-core package by default and has a default font configuration where the Noto Sans * fonts are preferred over DejaVu Sans.

Doing that in Ubuntu would be technically possible, but it would probably be considered a significant design change which would need to involve a lot of people.

I’ve not used this user name before in Ubuntu related stuff. I’m well anyway :slight_smile: not sure you talking to me anyway.

@gunnarhj
IMO opinion we have two routes. Once use a font that people who uses Arabic fonts agrees on. I think after testing the font suggested that it might be a bit little artistic, I don’t appose it but, something simple like “Droid Arabic Naskh” is preferred.

Regarding rendering, while I’m testing non-default fonts it seems like my eyes hurts a bit, maybe that is what you mentioned with quality fonts?

I don’t usually use Arabic interface but I would like to see enhanced fonts rendering as I’m dealing with Arabic text all the time so this is an issue to consider.

Noto Sans better then DejaVu on many cases and It support a lot of languages

Droid is the old version of Noto

I had clicked on your name :wink:

I have thought a bit more, and made a couple of changes to the test file /etc/fonts/conf.d/69-language-selector-ar.conf. It now looks like this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test name="lang">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Sans Arabic</string>
            <string>Noto Sans</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="lang">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>ui-sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Sans Arabic UI</string>
            <string>Noto Sans UI</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="lang">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Naskh Arabic</string>
        </edit>
    </match> 
</fontconfig>

It was the Kubuntu configuration which made me reconsider a couple of things (thanks @om26er!):

  1. I replaced Noto Sans Arabic UI for the sans-serif family with Noto Sans Arabic. In the fonts-noto-ui-core package description I read:

    Noto UI fonts are for text display in UI elements
    (e.g. buttons, menus) that have a height limit.

    and it’s probably not appropriate to always use an UI font for sans-serif.

    Hopefully this change addresses the observation which @URD made about the font being a bit “artistic”.

  2. I replaced Noto Sans Arabic for the serif family with Noto Naskh Arabic.

So this is the change I’m going to make to the language-selector package if nobody objects too much. Needless to say I’d appreciate if you could test with the latest variant first.

It has been considered, and the conclusion is that doing so would be a too big change to Ubuntu short-term. So for groovy we need to stick with a solution where you either need to use Arabic as the display language or work around that requirement somehow, for instance as I suggested here.

For the future I think that Ubuntu should consider a configuration similar to what Kubuntu does. That would mean that we could offer better rendering of Arabic (and a lot of other non-latin scripts) irrespective of the locale.

2 Likes

I think the ubuntu-devel list would be a good place to discuss a proposal along these lines, if you have the time/inclination to write up such a thing.

1 Like

Noticed. I might do so later.

It so huge

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test name="lang">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Sans Arabic UI</string>
            <string>Noto Sans</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="lang">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>ui-sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Sans Arabic UI</string>
            <string>Noto Sans UI</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="lang">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Naskh Arabic</string>
        </edit>
    </match> 
</fontconfig>

Will work better

@xlmnxp: Hmm… This is tricky for me, who don’t speak Arabic and hence have no own idea of which one looks best.

We are talking about which font is the best for the most important family sans-serif. You say that Noto Sans Arabic is huge, and @URD found Noto Sans Arabic UI a bit artistic.

What I see is that UI fonts are not really intended for general sans-serif use, and I also see that Kubuntu chose Noto Sans Arabic. Would it possibly be easier to reach consensus about Noto Naskh Arabic also for sans-serif?

Input from more Arabic speaking users about this choice would be highly desirable.

this video for how the font look huge to me
https://youtu.be/urVVR7uhbFA

I will ask some Arab Linux Community for tell us their opinion about the font
https://t.me/Arab_Linux

Excellent!

I noticed your comment in the video that the non-UI font requires more space at top and bottom. My understanding is that that is the intended difference between the two variants; hence the UI font is recommended for buttons and menus while the non-UI one is thought to be used more generally.

The problem here is that most GUI software probably does not make use of any ui-sans-serif font family (which is a new invention) and uses whatever font is specified for sans-serif.

If there proves to be a consensus among Arabic speaking users that Noto Sans Arabic UI is the best one as a general sans-serif font, then let’s pick that one.

Looking forward to know about the feedback you get.

1 Like

I also see that the Arabic font in Kubuntu 20.04 looks much better in Firefox.

I’m also ready to test any possible changes to improve the Arabic font in Ubuntu.

As input from more Arabic speakers was requested, I am the author of one of the original blog articles on hsoub.com references by xlmnxp in the original post. Since Ubuntu 16.04 the Arabic rendering of dejavu has become really unbearable for me I have left Ubuntu since then and came back in release 18.04 only to find the problem persisted, but thanks to some research I managed to circumvent the font by using gnome extensions, release 20.04 seems to have fixed a long lasting issue from 18.04 where changing the interface font in gnome tweaks did not affect browser tabs, that problem seems to now have been fixed. While fonts like noto naskh are very beautiful in Arabic, their English rendering is not so much polished, therefore I recommend trying Dubai Font which has both and Arabic and English renderings which are equally impressive.

Thanks for your input, @jamalinux!

Indeed there are ways for a user to customize fonts. This discussion is merely about providing a better default for Arabic speaking users.

You say that Noto Naskh isn’t excellent for rendering latin scripts. The main option discussed so far in this thread is Noto Sans. Do you have an opinion on that?

My understanding is that a font like Noto Sans Arabic can (or should) be combined with Noto Sans, and with that offer good rendering of both English and Arabic.

I had a look at the Dubai Font, and AFAICT it’s not free software, and if so it’s not an option for Ubuntu to provide by default. (It seems not to be packaged in the Debian/Ubuntu archives, and the lack of a FOSS license may be the reason for that.)

My understanding is that a font like Noto Sans Arabic can (or should) be combined with Noto Sans , and with that offer good rendering of both English and Arabic

If this can be achieved, then it would be fantastic, Noto Sans for Latin fonts is excellent (in my opinion, fonts are highly subjective matter) but not for Arabic fonts as it defaults to Dejavu, Noto Sans Arabic is great for Arabic but not so much for Latin, so if there’s a way to combine both where Noto Sans can handle Latin text and Noto Sans Arabic can handle Arabic text then that would be ideal in my opinion. Thank you for looking into this.

Jamal this is what happen now
the Noto Sans Arabic work only on Arabic characters

Look

1 Like