Change the default Farsi/Arabic font

Hi,
I have the latest Zorin installed. I switch between Farsi (Persian) and English as my day to day languages. The font that is used to display Farsi is terrible for extensive use. I know peoples' tastes differ, but just so you have an idea: It's like using comic sans for every thing in English.
My wish would be to use this font (GitHub - rastikerdar/vazirmatn: Vazirmatn is a Persian/Arabic font. وزیرمتن یک فونت فارسی/عربی است), which I have already installed in Font Manager.
In the repository of the font above, they recommend to change the fontconfig file, which doesnt exist in Zorin.
How can I make a change to the OS configurations to prioritize this font based on the language of the text it is rendering?

If you have experience with this question and Arabic language, it might also be helpful. Please share your experience.

Thanks

I found these sites which may help you but I don't know if something has to be adapted for Zorin/ubuntu 22:

https://www.baeldung.com/linux/configure-multilingual-fonts

https://linuxconfig.org/how-to-install-and-manage-fonts-on-linux

1 Like

Thank you. I will check it them out and report here later.

1 Like

Thanks. I followed this instruction and it worked out fine.

For those who will find this thread later, here is how my fonts.conf looks like now (it looks messy):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
      <test name="lang" compare="contains"><string>fa</string></test>
      <edit name="lang" mode="assign" binding="same"><string>ar</string></edit>
      </match>
<match target="font">
        <test name="lang" compare="contains">
                <string>ar</string>
        </test>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Vazirmatn</family>
                </prefer>
        </alias>
</match>
</fontconfig>
2 Likes

I have moved the thread from "Customisation" to "General Help".
If it solves the problem, Can you mark your last post as :white_check_mark: solution