Language-specific fonts not applying correctly in GNOME (example: Persian)

Hi everyone,

I’ve noticed an issue with language-specific fonts not being applied properly in modern GNOME (tested on Zorin OS 18, GNOME 46).

For example, I want the system to use Vazirmatn for Persian text, while keeping the default fonts (like Inter or Sans) for English.
I’ve set up the standard fontconfig rule like this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match>
    <test name="lang" compare="contains">
      <string>fa</string>
    </test>
    <edit name="family" mode="assign" binding="strong">
      <string>Vazirmatn</string>
    </edit>
  </match>
</fontconfig>

The command

fc-match :lang=fa

returns
Vazirmatn-Regular.ttf: "Vazirmatn" "Regular"
so fontconfig itself works fine.

However, GNOME apps (like Settings, Files, or Text Editor) completely ignore this rule and continue using Inter or Noto Naskh Arabic.
It seems that in newer GNOME versions (45+), fontconfig is bypassed by GTK4 and Pango when rendering UI text, which prevents per-language font substitution from working.

I think this is a broader issue affecting any non-Latin language (Arabic, Hebrew, Devanagari, etc.) where users want separate fonts for specific scripts.

If anyone knows the correct modern way to assign fonts per language in GNOME 46+ — or how to make GTK4 respect fontconfig language rules again — please share your solution or workaround.

Thanks! :folded_hands: