I ask for add better Arabic font for Ubuntu 20.04 for make it the most quality Ubuntu version ever
I am change font every time i install ubuntu (KDE neon has font installed and set for arabic by default) by add new file to /etc/fonts/conf.d/ named 99-arabic.conf content
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default font (no fc-match pattern) -->
<match>
<edit mode="prepend" name="family">
<string>Noto Sans</string>
</edit>
</match>
<!-- Default font for the ar_SA locale (no fc-match pattern) -->
<match>
<test compare="contains" name="lang">
<string>ar</string>
</test>
<edit mode="prepend" name="family">
<string>Noto Sans Arabic UI</string>
</edit>
</match>
<!-- Default sans-serif font -->
<match target="pattern">
<test qual="any" name="family"><string>sans-serif</string></test>
<!--<test qual="any" name="lang"><string>ar</string></test>-->
<edit name="family" mode="prepend" binding="same"><string>Noto Sans</string></edit>
</match>
<!-- Default serif fonts -->
<match target="pattern">
<test qual="any" name="family"><string>serif</string></test>
<edit name="family" mode="prepend" binding="same"><string>Noto Serif</string></edit>
<edit name="family" mode="append" binding="same"><string>Noto Sans Arabic</string></edit>
<edit name="family" mode="append" binding="same"><string>Noto Sans Arabic UI</string></edit>
</match>
<!-- Default monospace fonts -->
<match target="pattern">
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="same"><string>Noto Sans Arabic</string></edit>
<edit name="family" mode="append" binding="same"><string>Noto Sans Arabic UI</string></edit>
</match>
<!-- Default DejaVu Serif fonts -->
<match target="pattern">
<test qual="any" name="family"><string>DejaVu Serif</string></test>
<edit name="family" mode="assign" binding="strong"><string>Noto Sans Arabic</string></edit>
<edit name="family" mode="assign" binding="strong"><string>Noto Sans Arabic UI</string></edit>
</match>
<!-- Default DejaVu Sans fonts -->
<match target="pattern">
<test qual="any" name="family"><string>DejaVu Sans</string></test>
<edit name="family" mode="assign" binding="strong"><string>Noto Sans Arabic</string></edit>
<edit name="family" mode="assign" binding="strong"><string>Noto Sans Arabic UI</string></edit>
</match>
<!-- Fallback fonts preference order -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Open Sans</family>
<family>Droid Sans</family>
<family>Ubuntu</family>
<family>Roboto</family>
<family>NotoSansCJK</family>
<family>Noto Arabic</family>
<family>Noto Sans Arabic UI</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Droid Serif</family>
<family>Roboto Slab</family>
<family>Noto Sans Arabic</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Inconsolatazi4</family>
<family>Ubuntu Mono</family>
<family>Droid Sans Mono</family>
<family>Roboto Mono</family>
<family>Noto Sans Arabic</family>
</prefer>
</alias>
<alias>
<family>DejaVu Serif</family>
<prefer>
<family>Inconsolatazi4</family>
<family>Ubuntu Mono</family>
<family>Droid Sans Mono</family>
<family>Roboto Mono</family>
<family>Noto Sans Arabic</family>
</prefer>
</alias>
<alias>
<family>DejaVu Sans</family>
<prefer>
<family>Inconsolatazi4</family>
<family>Ubuntu Mono</family>
<family>Droid Sans Mono</family>
<family>Roboto Mono</family>
<family>Noto Sans Arabic</family>
</prefer>
</alias>
<dir>~/.fonts</dir>
</fontconfig>
maybe there better
I suggest font Noto Sans Arabic it opensource and modern
there Ubuntu Arabic font ( used in https://alusus.org/Documents/srt-reference.ar.html ) but it in beta i think
some conversations about ubuntu font in small Arabic community:
What about Google’s noto-naskh-arabic (the default arabic font in Android)?
I find it to be the best Arabic font ever. but i’m not sure about its license
@seb128: This discussion makes me think that this change would be a good idea. It would add 12 MB to the ISO. The fonts-noto source package seems to be in main already. What do you think?
Sorry but I don’t know enough about fonts to have an opinion there. If we don’t install the langpacks for those language is there really an interest to have the font preinstalled?
Fonts are used also for rendering web pages and documents, so even without language packs fonts matter. (And we do provide Arabic language packs. And we already ship a font for Arabic on the ISO - this discussion is about replacing it with a better one.)
fonts-noto-{,ui-}core includes fonts for many other scripts besides Arabic, while fonts-kacst{,-one} is for Arabic only. So you could argue that we would add some not-so-important fonts. OTOH Arabic is a widely used script, and improving the rendering of that script may be sufficient to justify those 12 MB archive size.
As a side effect we would provide high quality fonts for quite a few other scripts, which would allow us to stop language-selector-common from pulling certain fonts. (But I haven’t looked into that yet.)
It ought to make a difference compared to the default font configuration on Ubuntu. Maybe you had already installed those packages, and don’t notice a difference for that reason?
I thought it may be that so I reverted everything then tried the method [xlmnxp] mentioned and it worked (though it breaks some English fonts like in vs code and firefox tab titles). I then reverted to default again to try your method a second time your but it didn’t change the font. I may done something wrong, I would wait for xlmnxp and see if it worked for him. It may be because i’m currently running Pop OS distro? it’s Ubuntu based so I don’t think it would matter
Well, it’s important that this kind of change is successfully tested on standard Ubuntu before being implemented.
But with that said, I made a mistake. I now realize that more than one of the fonts which come with Ubuntu by default are capable of rendering Arabic script. So the simple approach I proposed, which works fine for e.g. Japanese and Korean, won’t work for Arabic.
For a new attempt it would be good if you could create the file /etc/fonts/conf.d/69-language-selector-ar.conf and give it this contents:
What I propose is a file that would be installed on all Ubuntu machines, and the idea is that it would be in use only if Arabic is set as the display language. The configuration is of such an aggressive nature that the test is necessary. It wouldn’t be reasonable to give Noto Sans Arabic the highest priority for all users.
So, what does your locale look like? Can you please run the
Well, yes there is, but the way you did it is the way I had in mind.
I’m thinking of making a change to the language-selector package which would result in the following:
If you install Ubuntu, and select Arabic as the language, it will be set up so the first time you boot up and log in, the improved Arabic rendering will be in place.
If you have an existing Ubuntu install and install the Arabic language via Manage Install Languages, the related packages will be pulled automatically. But then, in order to get the improved rendering, you’ll need to also change the display language to Arabic the way you just did.
@seb128: As you may have realized already, I found that my initial idea - to improve Arabic rendering for everyone irrespective of locale - was not practicable. Thus there is no need to add the packages to the ISO, and I deleted the platform merge request.
OTOH I submitted a new merge request in order to add the packages to supported. If I understand it correctly that’s necessary for those packages to be pulled by the installer in case of an Arabic install.