2

I want Ubuntu 22.10 to display serif Arabic text in the Noto Naskh Arabic typeface while sans-serif Arabic text in the Noto Sans Arabic typeface.

Specimen of Noto Naskh Arabic.

Specimen of Noto Sans Arabic.

How can I make Ubuntu install a default Arabic font for serif and another for sans-serif?

I want Ubuntu to follow a rule where, if it sees text whose typeface filename containing words like naskh or serif, it displays all that text in that particular typeface? And if another group of words are have typefaces with filenames containing words like sans or sans-serif, then Ubuntu would show all that text in the default sans-serif Arabic typeface?

Results of fc-match -a | head -10:

NotoSansArabicUI-Regular.ttf: "Noto Sans Arabic UI" "Regular"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
NotoSans-Bold.ttf: "Noto Sans" "Bold"
NotoSans-Italic.ttf: "Noto Sans" "Italic"
NotoSans-BoldItalic.ttf: "Noto Sans" "Bold Italic"
NotoSansArabicUI-Bold.ttf: "Noto Sans Arabic UI" "Bold"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"
NimbusSans-Regular.pfb: "Nimbus Sans" "Regular"

locale:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=ar_EG.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

1 Answer 1

3

Ubuntu's font configuration is prepared for doing just that.

First you need to have these packages installed:

sudo apt install fonts-noto-core fonts-noto-ui-core

Then there are two ways to achieve the desired behavior:

  1. Install the Arabic language via Language Support and select Arabic as your display language.

  2. If you don't want Arabic as the display language, you can generate some Arabic locale and assign it to the LC_CTYPE environment variable:

    sudo locale-gen ar_EG.UTF-8
    sudo update-locale LC_CTYPE=ar_EG.UTF-8
    

(and finally reboot)

6
  • Thanks for your answer, Gunnar. Do you know what I can do if I've done everything in your answer, but I keep seeing these ugly fonts? Before being forced to switch to Arabic as my display language, I want to give this another chance. Dec 4, 2022 at 20:45
  • @facialrecognition: After having done what I suggested, please edit your question and show us the output of these terminal commands: 1. fc-match -a | head -10 2. locale Dec 4, 2022 at 23:40
  • Good evening, Gunnar. I have just updated my question with the output of the commands in question. Dec 5, 2022 at 0:45
  • @facialrecognition: The edits look as expected. Since you have LC_CTYPE=ar_EG.UTF-8, fontconfig uses Noto Sans Arabic UI at first hand as the Arabic sans font. That should make a difference, and if you don't see that you need to be even more specific about how you reached your conclusion. Dec 5, 2022 at 0:49
  • Hi Gunnar. I think I'm still in this situation because DejaVu is still in use, even if de-prioritized. Do you happen to know how I can remove it entirely from my PC? That way, there will not be left any way for it to rear its ugly head again and for any other text to show itself in this font anymore. Thanks! Dec 5, 2022 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.