Closed Bug 1932814 Opened 15 days ago Closed 11 days ago

The Arabic text with Cursive font will fallback to Traditional Arabic font

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 134
defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox132 --- unaffected
firefox133 --- unaffected
firefox134 --- fixed
firefox135 --- fixed

People

(Reporter: over68, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

Steps to reproduce:

Open
data:text/html;charset=utf-8,<div style="font-family:cursive;font-size:80px">السلام عليكم

Expected result:

The Arabic text will be displayed in Arial font instead of Traditional Arabic font.

I can also reproduce with monospace font.

data:text/html;charset=utf-8,<div style="font-family:monospace;font-size:80px">السلام عليكم

It doesn't look like we have an Arabic font configured for cursive by default: https://searchfox.org/mozilla-central/rev/5da13af5e6be251b70e994c8b4bd35fb5271f1e3/modules/libpref/init/all.js#2132-2135 shows that font.name-list.cursive.ar just lists Comic Sans, which would work for any Latin characters present in content tagged with lang=ar, but AFAIK doesn't include actual Arabic characters.

Given that, it's not clear what cursive should resolve to in Arabic; it's just a fallback of some kind. Specifying a suitable font in the font.name-list.cursive.ar pref would provide control over this.

Regressed by: bug 1928012

Yes, the fallback rewrite in that bug did change behavior here; we previously tried Arial as a first-choice fallback for everything, whereas now we try more script-specific options first.

So basically this is suggesting -- in the absence of specific fonts being configured in the font.name-list.* prefs for these generics -- that Arial would be a preferable fallback, rather than the Traditional Arabic that we're now getting?

The Traditional Arabic font is not clear, Arial is best.

Attached image test.jpg

I'm not seeing this issue in Nightly - https://arkenfox.github.io/TZP/tests/fontdebug.html

edit: I need to learn to read expected result properly - enjoy the test page

This restores the preferred fallback font we were using prior to bug 1928012,
for better text clarity.

Assignee: nobody → jfkthame
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Set release status flags based on info from the regressing bug 1928012

Not in WPT as the particular fonts used for fallback are not in any way specified
or standardized; this is just testing the particular behavior we have implemented
in Gecko (for now -- we might change the font configuration prefs in future, and
if so this test will potentially need adjusting to match).

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b6165cc77c14 Use Arial as default fallback font for Arabic script on Windows. r=dholbert https://hg.mozilla.org/integration/autoland/rev/b136e0dc43e3 Basic reftest for GetCommonFallbackFonts for Arabic on Windows. r=TYLin
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch

The patch landed in nightly and beta is affected.
:jfkthame, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox134 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(jfkthame)

This restores the preferred fallback font we were using prior to bug 1928012,
for better text clarity.

Original Revision: https://phabricator.services.mozilla.com/D230049

Attachment #9440249 - Flags: approval-mozilla-beta?

Not in WPT as the particular fonts used for fallback are not in any way specified
or standardized; this is just testing the particular behavior we have implemented
in Gecko (for now -- we might change the font configuration prefs in future, and
if so this test will potentially need adjusting to match).

Original Revision: https://phabricator.services.mozilla.com/D230135

Attachment #9440251 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Undesired fallback font choice for some Arabic content on Windows
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: minimal
  • Explanation of risk level: Just a change to default fallback font for Arabic script
  • String changes made/needed: none
  • Is Android affected?: no
Flags: needinfo?(jfkthame)

While this isn't really a "correctness" issue, as there's no hard and fast rule about what fallback fonts should be used, in practice the changed default that resulted from the Windows font fallback rewrite was undesirable for users, so this just reverts to preferring Arial (matching our longstanding behavior).
So IMO we should uplift this to avoid shipping the unwanted change to Release for one cycle.

Attachment #9440249 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9440251 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: