Page MenuHomePhabricator

Amiri font for Arab lacks italics and bold causing bad rendering
Closed, ResolvedPublic

Description

Moved from bug 41359.
Attachment 11341 shows current rendering on ar.wiki; attachment 11342 the expected one.
Bug 41359 comment 22 also proposes an interpretation of the problem.

See Also:
T52470: Making system font the default option
T49810: Rendering issue in Arabic

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:53 AM
bzimport set Reference to bz41940.
bzimport added a subscriber: Unknown Object (MLST).

Any progress in this, the faux bold is really disturbing.

(In reply to comment #1)

Any progress in this, the faux bold is really disturbing.

Very likely NOT on a weekend within 36 hours after reporting the problem.

36 hours are too much if you are seeing this all the time, and it is not the week end here either :) So sorry for being so persistent, and please let me know if there is anything I can help with.

Merged, waits for deployment.

Now on Arabic wikipedia all four styles have "local('Amiri')" in the @font-face declaration, as a result people who have the font locally installed are getting the regular font for all text styles (at least on Firefox 17).

Hello, Can you please add a screenshot for the problem that you have been facing? Thanks.

Created attachment 11970
Font styles when Amiri font is selected

Attached:

لقطة_شاشة_من_2013-03-22_13:10:21.png (741×1 px, 118 KB)

Created attachment 11971
Font styles when system font is selected

Attached:

لقطة_شاشة_من_2013-03-22_13:10:28.png (741×1 px, 120 KB)

ecreasing the impact. Font is not default.

Any chance of getting this fixed, the fix seems trivial as outlined in bug 41359, comment 22.

OK, after reading bug 41359, comment 22 again, I see why it wasn’t that helpful as it didn’t actually point to the real issue.

The problem is that all the four @font-face rules for Amiri has "local('Amiri')" which causes Firefox to use the regular font for all styles if the user has the font locally installed. The fix is to use "local('Amiri')", "local('Amiri Bold')", "local('Amiri Slanted')" and "local('Amiri Bold Slanted')" for regular, bold, italic and bold italic fonts, respectively.

Using Italic instead of Slanted also works, in case it simplifies things.

Created attachment 14288
Untested patch

I guess something like that should work, but I couldn’t test it (I fear it will need setting up local MediaWiki install which is not something I’ve done before).

Attached:

(In reply to comment #15)

Created attachment 14288 [details]
Untested patch

I guess something like that should work, but I couldn’t test it (I fear it
will
need setting up local MediaWiki install which is not something I’ve done
before).

Thank you! Please see [[mw:How to become a MediaWiki hacker]], particularly [[mw:MediaWiki-Vagrant]] to test locally and [[mw:Gerrit/Tutorial]] on how to send your patch to gerrit, to speed things up.

Attached:

Change 201124 had a related patch set uploaded (by KartikMistry):
Update Amiri fonts

https://gerrit.wikimedia.org/r/201124

Change 201124 merged by jenkins-bot:
Update Amiri fonts

https://gerrit.wikimedia.org/r/201124

Nikerabbit updated the task description. (Show Details)
Nikerabbit removed a subscriber: wikibugs-l-list.

Has the update fixed this this issue?

The issue is still not fixed. When you have Amiri font installed locally all styles (regular, bold, italic and bold italic) will use the regular font. This is caused by wrong use of local() keyword in the generated CSS by the extension and it should affect any font not just Amiri. See the spec for how local() should be used. The patch I submitted above should fix this, but it has been largely ignored.

Most likely it has gone unnoticed because we track patches in Gerrit (or in GitHub in case of jquery.ime), not in Phabricator.

I installed Amiri font to test this patch. Apparently it cannot be reproduced in my system. I do wonder if the variant names are correct, because even though amiri-regular is no longer loaded, I see the variants getting loaded? Shouldn't those be also used from my local system?

What browser are you using, I tested with Firefox but other browsers might be behaving differently.

This is waiting for a comment from Santhosh when he has time.

@KhaledHosny Can you confirm if this is fixed now? It was merged and deployed with 033bf62c00bc21af6a5864c049f6280486148658 change in ULS.