You are not logged in.
file: .fonts.conf
<?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>Amiri</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>Amiri</string>
</edit>
</match>
</fontconfig>
notes:
- the file is not physically in the home directory, but it is a soft link
- the fonts that are specified in .fonts.conf are installed in ~/.local/share/fonts, and not globally
behavior:
- system apps (nautilus), 3d party apps (vscode), and browsers seem to use a globally installed font to render arabic text, with the exception of firefox, which follows the .fonts.conf rules
expected behavior:
- all apps using the 'Amiri' font for arabic text as per the rules specified in .fonts.conf
relevant details:
- archlinux with gnome
- apps are installed through pacman, and not flathub, so they pretty much can access config files in the home directory
Last edited by kiskiller0 (2024-07-26 12:59:38)
Offline
https://wiki.archlinux.org/title/Font_c … les#Arabic
The above should work for most applications but some applications like Chromium do not work with the language match test. If you find some applications not using your selected fonts, you can use the below alias and prefer tags which seems to work.
locale
Offline