Interface font fallback should resolve through system-ui, not generic sans-serif — breaks UI metrics for Arabic and other complex scripts

Setting the interface font to Adwaita Sans:

gsettings set org.gnome.desktop.interface font-name 'Adwaita Sans 11'

works fine for Latin text, but Adwaita Sans doesn’t cover non-Latin scripts, so glyph resolution falls back through fontconfig’s generic sans-serif alias. On Fedora — which ships Noto as the default fallback — that currently resolves to the document-oriented Noto family for each script (e.g. Noto Sans Arabic), which has noticeably taller line metrics than a UI font.

This isn’t Arabic-specific. Noto publishes UI-scoped variants precisely for this reason, and the split applies to a wide set of complex scripts: Arabic uses Noto Sans Arabic UI or Noto Naskh Arabic UI for interfaces with limited vertical space, with the non-UI fonts reserved for documents, and the same UI/non-UI split applies to Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Khmer, Lao, Malayalam, Myanmar, Oriya, Sinhala, Tamil, and Telugu (see Noto’s guidance). Falling back through plain sans-serif skips that distinction for every one of these scripts, so UI strings (menus, labels, buttons) in any of them end up with mismatched line-height/vertical rhythm next to Latin/Adwaita Sans text in the same window.

This isn’t fixable by just installing the UI font. google-noto-sans-arabic-ui-fonts (and the equivalent UI packages for the other scripts above) is not installed by default on Fedora — only the document-variant packages are pulled in as part of the default Noto fallback set. So even a user who’s aware of the UI/non-UI distinction can’t get correct metrics without manually installing an extra package per script, and even then, nothing in the fallback chain prefers it over the non-UI family once it is installed — the fallback resolution itself needs to target a UI-scoped generic.

Expected behavior: the interface font stack’s fallback should route through a UI-scoped generic (system-ui, per the CSS Fonts model) rather than plain sans-serif, so script fallback picks UI-optimized faces automatically for any of the affected scripts — and Fedora’s default font set should include the UI variants for this to work out of the box.

Why this matters: this looks like the same underlying gap as the earlier system-ui fontconfig work from the Cantarell → Adwaita Sans transition (RHBZ#2449666, RHBZ#2453024) — it just wasn’t visible for Latin-only setups since Adwaita Sans covers Latin natively. It becomes visible as soon as any of these scripts needs fallback.

Steps to reproduce (test on Fedora, not GNOME OS; Arabic used here as the concrete case):

  1. sudo dnf install google-noto-sans-arabic-ui-fonts (not installed by default)
  2. gsettings set org.gnome.desktop.interface font-name 'Adwaita Sans 11'
  3. Switch to an Arabic locale / open an app with Arabic UI strings
  4. Observe line height / vertical spacing mismatch vs. Latin UI elements in the same window — the mismatch persists even with the UI font installed, since fallback doesn’t prefer it

Note: GNOME OS ships DejaVu Sans as its fallback rather than Noto, so this won’t reproduce there — needs to be tested against a Noto-based system (Fedora is the natural choice, since it’s the default there).

Environment: Fedora Rawhide, GNOME (current), fontconfig (2.18.3)

Simple Test for example:

Look to Calendar day 2 ( عطلة ) and 3 (Holiday).

[Good] Adwaita Sans + Noto Sans Arabic UI (System UI)

[Bad] Adwaita Sans + Noto Sans Arabic (Sans Serif)