#StackBounty: #linux #fonts #fontconfig #deepin Changing font family for characters of a certain language/script using fontconfig?

Bounty: 50

I am on Arch Linux, Deepin Desktop. I am using Noto Serif as my standard font, but I don’t like its Arabic characters. So my goal is to use another font just for arabic characters.

Here is what I have tried. I created a new configuration file in /etc/fonts/conf.d/ with the following contents:

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

    <match target="pattern">
        <test name="lang" compare="contains">
            <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>

I then ran fc-cache -r. But this didn’t work, the same font is still in use and running fc-match returns NotoSerif-Regular.ttf: "Noto Serif" "Regular" just as before.


Get this bounty!!!

#StackBounty: #configuration #fonts #fontconfig #emoji Use a specific font for emojis

Bounty: 100

i’d like to use the pretty Segoe UI Symbol emoji.

I installed the font by copying it over from my windows install, and awesomely enough, my system falls back to it for all emoji that my main font doesn’t have. But all (black and white) emoji existing in my main font are used.

How can I tell fontconfig to prefer “Segoe UI Symbol” for certain unicode ranges (the ones defined here)?


Get this bounty!!!