Bug 2251384 - Wrong Arabic font prioritization in several apps. (Droid kufi prioritized over noto-sans)
Summary: Wrong Arabic font prioritization in several apps. (Droid kufi prioritized ove...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: google-noto-fonts
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-24 15:41 UTC by Ali
Modified: 2024-09-05 09:42 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-09-05 09:42:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Noto-sans-arabic padding/size problem (44.89 KB, image/png)
2024-07-01 19:46 UTC, Ali
no flags Details

Description Ali 2023-11-24 15:41:47 UTC
Description of problem:
Few fedora releases ago, Noto-Sans-Arabic was set to  be the default. It was working fine and Arabic text was displayed in all web browsers using this font.

sometime in last few months, every web browser in fedora suddenly started prioritizing "Druid Kufi" font over noto-sans-arabic. which now looks makes arabic text looks jarring.

Interestingly, when running from live usb image, noto-sans-arabic is correctly priotirized and being used to render all arabic web pages, but only for FEW MINUTES and then suddenly it's switched to druid kufi!, without updating anything, just running Firefox for few minutes.

It's also reproducible after fresh install, the first 3 minutes of using the new fedora installation, Firefox and other browsers are displaying noto-sans then suddenly switch to druid kufi.

Version-Release number of selected component (if applicable):
38-39

How reproducible:
Consistently

Steps to Reproduce:
1.Connect to internet
2.Open arabic webpage in firefox (ex, wikipedia)
3.text would be displayed with druid kufi instead of the default noto-sans-arabic which was chosen to be the default sometime around fedora 36.

Actual results:
Arabic Text displayed with druid kufi font

Expected results:
Arabic text should be displayed using noto-sans-arabic as was the case before.

Additional info:
The font in gnome and top bars is still correctly displayed using noto-sans-arabic. It's browsers that exhibit the problem.

Comment 1 Akira TAGOH 2023-11-29 07:47:43 UTC
How's your font settings in firefox?

I tried browsing https://ar.wikipedia.org on firefox in freshly installed f39. I can't see "Droid Arabic Kufi" font family name in some debugging information when I inspected a page with the developer tool.

> The font in gnome and top bars is still correctly displayed using noto-sans-arabic. It's browsers that exhibit the problem.

It might be most likely a problem on firefox since it works on desktop generally.

Comment 2 Ali 2023-11-29 13:06:55 UTC
Ok some of my the points i reported are apparently wrong/inaccurate. I should have been more diligent before reporting, sorry. 

The problem was somehow connected to my firefox account syncing, so now this testing is with now account syncing.
So the following testing is all from live usb with no firefox account

current findings:
1. Using latest fedora image, I can reproduce the kufi font problem only by using private windows in firefox. normal windows are using the correct noto sans but private windows somehow use kufi in firefox.
2. Forcing change in the font settings of firefox doesn't seem to have an effect.
3. Gnome epiphany web is all Kufi, no noto at all.
4. Chrome/Chromium are using noto sans for webpages, but somehow tab titles are using kufi.

None of these problems are reproducible in other distros that use noto sans arabic as default.
For example ubuntu which uses noto sans, correctly display noto sans in the everywhere in all of the previously mentioned 4  problematic scenarios . 

Seeing that kufi font is somehow found to be used in wierd specific cases across several totally unrelated packages in fedora(epihany/chrome/firefox), and these findings are completely absent in ubuntu, I wonder what is the current fedora config of the kufi font? What are these applications doing that they somehow get kufi font to render some text only in fedora but not other distros?! I don't know anything about how fonts work in linux so i'm helpless here.

Thanks.
@tagoh

Comment 3 Akira TAGOH 2023-11-30 07:47:56 UTC
> None of these problems are reproducible in other distros that use noto sans arabic as default.
> For example ubuntu which uses noto sans, correctly display noto sans in the everywhere in all of the previously mentioned 4  problematic scenarios . 

With Droid Arabic Kufi font installed? or without?

> Seeing that kufi font is somehow found to be used in wierd specific cases across several totally unrelated packages in fedora(epihany/chrome/firefox), and these findings are completely absent in ubuntu, I wonder what is the current fedora config of the kufi font? What are these applications doing that they somehow get kufi font to render some text only in fedora but not other distros?! I don't know anything about how fonts work in linux so i'm helpless here.

We have google-droid-sans-fonts installed due to satisfy dependency for ghostscript. We know it has some problems on text rendering but we can't drop it because of it.

Anyway:

> 1. Using latest fedora image, I can reproduce the kufi font problem only by using private windows in firefox. normal windows are using the correct noto sans but private windows somehow use kufi in firefox.

This looks more likely a firefox specific problem. let me reassign this to firefox so far.

Comment 4 Ali 2023-11-30 09:35:14 UTC
> With Droid Arabic Kufi font installed? or without?
Yes with Droid Arabic Kufi font installed, Ubuntu's firefox doesn't prioritize droid kufi over noto-sans. Also gnome epiphany browser on ubuntu uses noto sans, while fedora's gnome web browser completely favours kufi droid.
The kufi droid isn't available as a package in ubuntu so I copied the ttf from fedora and installed it in ubuntu using gnome fonts app. can't reproduce the issue even after i reinstalled fontconfig in ubuntu to regenerate the fontcache. Intrestingly I believe ubuntu is using fonts-droid-fallback package That i beileve (don't know) links droid names to sans fonts as arabic noto fonts were historically dorid fonts. For example they have noto-kufi-arabic preinstalled which is exactly the same as droid kufi just different name but noto-sans-arabic is always prioritized. Not sure if this has any relevance.

> This looks more likely a firefox specific problem. let me reassign this to firefox so far.

Possibly, but isn't that unlikely considering the problem is also replicated using gnome web on fedora but not on ubuntu's gnome web?


In addition, there are more problems with arabic font config in fedora. For example, if dejavu fonts are installed on fedora, they automatically become prioritized over anything noto for arabic.
this happens in both Gnome web and firefox(private windows). Dejavu was the previously the default for arabic, considering it's very ugly and gets installed as dep for popular packages like vlc, I think this may warrant further investigation. Interestingly, Ubuntu still keeps dejavu preinstalled, but again it never get prioritized over noto sans for arabic like in fedora.

Thanks.
@tagoh

Comment 5 Akira TAGOH 2023-12-04 05:58:24 UTC
If you try this with new profile on firefox and/or new account on Fedora, does this still happen?

Comment 6 Ali 2023-12-04 09:58:48 UTC
Yes, I'm still able to reproduce the issue after creating new profile in firefox, private windows still use kufi over noto.

Comment 7 Akira TAGOH 2023-12-14 08:25:00 UTC
After a few investigation, I figured out that this may be fixed in google-noto-fonts package.

Comment 8 Ali 2023-12-17 20:15:27 UTC
Good, thanks for your work.

Another problem regarding the Arabic font config is that  if dejavu fonts gets installed, it automatically becomes the main font of webpages in both firefox and gnome web.
I believe  this bug has existed from the beginning since fedora switched to noto.

Could you reproduce the issue on your side?

Comment 9 Ali 2024-06-23 09:54:40 UTC
This has been solved for sometime now. thanks.
I wonder if the UI variant of Arabic noto fonts should be used instead of regular ones.
The regular (current) ones have height issue, they are too tall and do disrupt the layout of the apps and GTK window decorations,  it has been discussed with example here: https://discourse.ubuntu.com/t/request-better-arabic-font-for-ubuntu-20-04/14573/43

thanks.

Comment 10 Akira TAGOH 2024-06-28 08:38:17 UTC
Thank you for your suggestion. I think we need to submit Change for f41 if we want to change the default font from Noto Sans Arabic to Noto Sans Arabic UI. Do you want to do it?

Comment 11 Jens Petersen 2024-07-01 06:07:43 UTC
But why only Arabic seems to need the Noto UI font?
I do think this is a good discussion topic, but let's tred carefully
and make sure we get things right for Arabic.
To me it seems worth discussing with upstream too.

Comment 12 Jens Petersen 2024-07-01 06:21:01 UTC
Reading the Ubuntu thread (again?) it also seems the UI font is not universally preferred for content maybe only for UI.
Maybe what we really need is a way to configure default language fonts separately for UI?
(There was also previously debate about Arabic Naskh vs Arabic Sans, where I think we reverted to Sans.)

Comment 13 Ali 2024-07-01 19:46:34 UTC
Created attachment 2038653 [details]
Noto-sans-arabic padding/size problem

Note that I'm offering feedback from my perspective as native Arabic speaker, but I lack expertise in digital fonts and GUIs, so take my suggestion as non-technical input.

1. My only reason for suggesting to consider the UI variant is because the current non UI variant has excessive padding that is not in line with English fonts sizes/dimensions (see the ubuntu discussion photo above) and their presence in the UI changes the size of widgets and layout of apps. It espcially looks out of place when highlithing mixed english-arabic letters in one line: (see attached image)

2. Stylistic differences are tiny between regular noto and UI version, with the UI version having less curvature and straighter vertical columns, but the difference is negligible for general use IMHO. Actually i'm perplexed as to why the padding is huge on non-ui variant despite the glyphs are visually near identical in height between the two.

3. Several languages' Noto fonts, not just Arabic, have UI variants. If they are used in Fedora, these should be inspected as I suspect they may cause similar issue of the padding/size in the GUI like with Arabic fonts. (see: https://notofonts.github.io/noto-docs/specimen/NotoSansArabicUI/)

Comment 14 Akira TAGOH 2024-09-05 09:42:08 UTC
(Revisiting for triaging old bugs because f39 is going to be EOL soon)

Can you please file an another issue for Sans Arabic vs Sans Arabic UI?

Mixing up a few topics in one bug is difficult to see what it is, particularly from Summary. We could change it but the discussion about different (original) issue on comments causes a confusion.

I'll close this so far according to the comment#9.

Thanks


Note You need to log in before you can comment on or make changes to this bug.