From d3fdaca1a94cbbf75ff38b37781cca31177cc855 Mon Sep 17 00:00:00 2001 From: Husam Date: Mon, 27 Jul 2026 03:39:04 +0300 Subject: [PATCH] Fix Arabic falling back to Nastaliq in Chromium and Electron apps (#6377) * Fix Arabic falling back to Nastaliq in Chromium and Electron apps * Cover the widened patterns too, and leave Urdu in Nastaliq The weak binding only won the last-resort race for patterns fontconfig had not widened. Anything whose family expands through the latin and nonlatin alias chains -- Arial, Helvetica, Verdana, sans-serif, and so the bulk of real CSS -- still resolved Arabic to Kufi, a display face that suits body text no better than Nastaliq did. A strong binding wins those too. Charset matching outranks family matching either way, so a font that does not cover the codepoint still cannot be pulled in: Latin, monospace, emoji, Nerd Font glyphs and CJK all resolve as before. The untargeted rule also captured Urdu, which #6322 had deliberately left alone by scoping itself to lang=ar. Urdu is conventionally set in Nastaliq, so name it for lang=ur ahead of the Naskh append. Appended rather than prepended, or it would displace the family the app asked for and render Latin text in an Urdu locale as Nastaliq. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Mb1gPTJ6s7QyQZck7Z6F9v --------- Co-authored-by: David Heinemeier Hansson Co-authored-by: Claude Opus 5 (1M context) --- default/fontconfig/conf.avail/50-omarchy.conf | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/default/fontconfig/conf.avail/50-omarchy.conf b/default/fontconfig/conf.avail/50-omarchy.conf index 95f4f508..eecf66e0 100644 --- a/default/fontconfig/conf.avail/50-omarchy.conf +++ b/default/fontconfig/conf.avail/50-omarchy.conf @@ -38,6 +38,34 @@ + + + + ur + + + Noto Nastaliq Urdu + + + + + + + Noto Naskh Arabic + + + system-ui