Bug 275694 - Wrong glyph digit shapes for extended arabic-indic digits
Summary: Wrong glyph digit shapes for extended arabic-indic digits
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2024-06-20 09:26 PDT by r12a
Modified: 2024-06-23 17:14 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description r12a 2024-06-20 09:26:25 PDT
This issue is applicable to Persian, Urdu and Sindhi.

Persian, Urdu and Sindhi use extended-arabic-indic codepoints for digits in list counter styles. However, languages that use these code points tend to prefer specific glyph shapes for certain numbers, as shown here.
https://r12a.github.io/scripts/arab/ur.html#numbers

The GAP

An intelligent opentype font may be able to detect the language of the text and substitute appropriate glyphs if it is used for the content, but here we are looking at the default behaviour of the browser, with no fonts explicitly assigned to the text.

Blink displays Persian digit glyphs in all three cases.

Webkit renders the correct glyphs for Persian and Urdu, but not for Sindhi.

Gecko renders Persian glyph shapes throughout, even though it uses different fonts for Persian vs. Urdu/Sindhi.


Tests & results

Interactive test, The browser uses appropriate digit glyph shapes for Persian, Urdu, and Sindhi by default.
https://github.com/w3c/glyph_character_tests/issues/32

I suppose one fix for this would be to fall back to appropriate fonts based on the language of the text. There may also be other options i'm unaware of.  It's not clear to me how Safari gets the Urdu correct.
Comment 1 Radar WebKit Bug Importer 2024-06-20 09:30:13 PDT
<rdar://problem/130211021>