notofonts / arabic

Noto Arabic
SIL Open Font License 1.1
15 stars 2 forks source link

The Nastaliq Urdu font should not be chosen for Arabic or Persian text #240

Closed tonijarjour closed 3 months ago

tonijarjour commented 3 months ago

This does not happen when both Dejavu and Noto Fonts are installed. Urdu pages are displayed with the Urdu font, while Arabic and Persian are displayed with a Dejavu font. I may be mistaken, but to me this implies the problem is with the Noto Fonts package.

I can't read this: image

simoncozens commented 3 months ago

I'm not sure this is the fault of the font, but of whatever software is choosing which font to render the text in. Which browser are you using?

tonijarjour commented 3 months ago

This happens on both Chromium and Firefox. OS is Arch Linux. This image is WITHOUT Dejavu installed. out This is with Dejavu installed. out2

The only thing I want is for it to work properly with Noto on its own. I can fix it for my personal computer with a config file, but for everyone else it is incorrect.

avidseeker commented 3 months ago

Related discussion: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/173

simoncozens commented 3 months ago

Yep, further confirmation that this is due to the way that fontconfig is choosing fonts. When you have two fonts - Noto Naskh Arabic and Noto Nastaliq Urdu - which both support the Arabic codepoints, fontconfig doesn't currently have any good heuristic for "knowing" which one is appropriate for Urdu and which for Arabic.

There is a solution to this long term - the dlng and slng entries in the meta table, which allow the font to provide that information. But fontconfig doesn't currently read that table, and we don't currently provide it. We should start doing so. It won't fix your problem, but it means that when fontconfig learns how to read the meta table, things can start working.

simoncozens commented 3 months ago

I've now added the meta table to Noto Nastaliq Arabic, and hopefully at some point in the future, software will know to prefer it for Urdu, Kashmiri, Kyrgyz, Uyghur, Balochi and Crimean Tatar, but not for Arabic, Farsi, etc.