Arabic digits are not enclosed in ARABIC NUMBER SIGN, ARABIC END OF AYAH, etc.

RESOLVED FIXED

Status

()

--
major
RESOLVED FIXED
11 years ago
3 years ago

People

(Reporter: karimarif, Assigned: smontagu)

Tracking

({fixed1.9.1})

unspecified
fixed1.9.1
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0

I have worked on an indo-pak arabic quranic font, that works fine in internet explorer, but when i open the web page in Firefox, the numbers of quranic digits stay outside the circle: Here is the comparison between ie8 and firefox 3 rc2:
[img]http://i169.photobucket.com/albums/u218/arifkarim/a140.gif[/img]
[img]http://i169.photobucket.com/albums/u218/arifkarim/a141.gif[/img]

I am using the latest version of uniscribe on both browsers. All other complex features of this font are working better in firefox than any other competing web browsers :) This is the only buggy problem :( I hope u developers will fix this problem soon....

Note: these digits are defined as marks in opentype language, which firefox is unable to understand.... Plz solve this problem before release... thnx

Reproducible: Always

Steps to Reproduce:
1. U need to make sure Mozilla Firefox supports latest uniscribe, Thats All!
2.
3.
Assignee: nobody → smontagu
Component: General → Internationalization
Product: Firefox → Core
QA Contact: general → i18n
Summary: Arabic Font Problem!!!! → Arabic Font Problem
(Assignee)

Comment 1

11 years ago
Is there a version of the font available for download for testing purposes? This sounds similar to bug 290775.
Depends on: 290775
(Assignee)

Comment 2

11 years ago
In fact bug 290775 no longer occurs, but the testcase there just has the End of Ayah characters without digits, so it doesn't help for testing this bug. Can you attach a testcase?
(Assignee)

Comment 3

11 years ago
Created attachment 325150 [details]
Testcase

I can confirm this using the SIL Scheherazade font from http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=ArabicFonts_Download. I added the hacks described at http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=arabicfonts#7f69be97 to the testcase, but they don't help.
(Assignee)

Comment 4

11 years ago
This happens because the End of Ayah character is defined in Unicode <=5.0 with a Bidi character type of "AL" (Arabic Letter) and so is right-to-left, while the digits have a character type of "AN" (Arabic Number) and so are left-to-right. This makes us render them in separate text runs.

The definitions are being changed in Unicode 5.1, so this should be fixed by bug 427350.
Status: UNCONFIRMED → NEW
Depends on: 427350
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Summary: Arabic Font Problem → Arabic digits are not enclosed in ARABIC NUMBER SIGN, ARABIC END OF AYAH, etc.
(Reporter)

Comment 5

10 years ago
(In reply to comment #4)
> This happens because the End of Ayah character is defined in Unicode <=5.0 with
> a Bidi character type of "AL" (Arabic Letter) and so is right-to-left, while
> the digits have a character type of "AN" (Arabic Number) and so are
> left-to-right. This makes us render them in separate text runs.
> The definitions are being changed in Unicode 5.1, so this should be fixed by
> bug 427350.


thnx Simon
its good that u regenrated the problem using shehrazade font, actually i made my font on it......

but i need to inform u that the bug still exists even in the latest version of firefox: 3.1

Can u check if the problem is solved?
(Assignee)

Comment 6

10 years ago
It's not solved yet, since it depends on bug 427350, which is not yet checked in (there is a patch awaiting review).
(Reporter)

Comment 7

10 years ago
(In reply to comment #6)
> It's not solved yet, since it depends on bug 427350, which is not yet checked
> in (there is a patch awaiting review).

so u think this patch will remove this problem? thnx again for ur kind help.........
(Assignee)

Comment 8

10 years ago
I'm not 100% sure that it will be enough to solve the problem. After it's checked in, we may need an additional patch.
(Reporter)

Comment 9

10 years ago
(In reply to comment #8)
> I'm not 100% sure that it will be enough to solve the problem. After it's
> checked in, we may need an additional patch.

hmmm, a guy on this mozillazine forum thread says that this bug was reported in firefox 2, so it cannot be fixed in firefox 3 builds! is he right?
http://forums.mozillazine.org/viewtopic.php?f=23&t=664795&p=4003805
(Assignee)

Comment 10

10 years ago
I've reset the target milestone in bug 427350 to mozilla1.9.1.
(Assignee)

Comment 11

10 years ago
Created attachment 351186 [details]
Testcase (with typo fix)
Attachment #325150 - Attachment is obsolete: true
(Assignee)

Comment 12

10 years ago
Created attachment 351188 [details] [diff] [review]
Patch

This works in Windows, half works in OS X (only the third line of the testcase works, which is the same as in Safari), and doesn't work at all in Linux. Maybe a bug in Pango?

Ehsan, I'm asking you for review in case this conflicts in some way with your work on bug 441782
Attachment #351188 - Flags: review?
(Assignee)

Updated

10 years ago
Attachment #351188 - Flags: review? → review?(ehsan.akhgari)

Comment 13

10 years ago
Comment on attachment 351188 [details] [diff] [review]
Patch

No, I don't think this conflicts with my work on bug 441782.
Attachment #351188 - Flags: review?(ehsan.akhgari) → review+
(Assignee)

Comment 14

10 years ago
Jonathan, I just noticed that you are one of the developers of the Scheherazade font. Can you throw any light on why the testcase doesn't render correctly on Linux and OS X?
In brief, because of limitations of the shaping engines we're using.

Note that although the 3rd line does the combination in Safari, the digits now read backwards (12 becomes 21) because of the override, so this isn't really a useful workaround. I'd guess the same is true with your patch (haven't tried it yet).

When I was working on Scheherazade, we never did come up with a satisfactory way to make this work through ATSUI, except by hacky use of overrides and messing with the encoding order, so I'm not surprised at the results you're seeing. I'll be interested to see what happens with CoreText on Leopard.... that's close to being ready to try.

Re Pango, it's simply not supported there, AFAIK.
(Reporter)

Comment 16

10 years ago
Thnx to both Jonathan and Simon... Glad, finally a patch for Windows is working indeed. :). But I have a question: How do  I use this patch? Also I wonder if this patch fix would be included in the future releases of Firefox?
(Assignee)

Comment 17

10 years ago
Pushed as http://hg.mozilla.org/mozilla-central/rev/eff94ca7dcae.

Arif, this will be in forthcoming nightly builds of Firefox and certainly in 3.2. I will also be asking approval to check it in to 3.1.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
(Assignee)

Comment 18

10 years ago
Comment on attachment 351188 [details] [diff] [review]
Patch

This is low-risk, and well-baked on trunk.
Attachment #351188 - Flags: approval1.9.1?
Comment on attachment 351188 [details] [diff] [review]
Patch

a191=beltzner
Attachment #351188 - Flags: approval1.9.1? → approval1.9.1+

Comment 21

7 years ago
Not sure if it is a regression or a different bug, but using Firefox 12 on Linux, the digits are not enclosed by the end of ayah mark on the three lines, and for other signs there are enclosed on the last line only. If I switch the font to Amiri, end of ayah works fine with the 1st two lines, but not the third, all others are broken. Since my font is using the same OpenType lookup for all the 4 signs, I expect there is something wrong with the Unicode characters properties.

Comment 22

7 years ago
Created attachment 628598 [details]
Screenshot with Scheherazade

Comment 23

7 years ago
Created attachment 628599 [details]
Screenshot with Amiri
(Assignee)

Comment 24

7 years ago
As far as I remember, and judging by comment 12, comment 14 and comment 15, this never worked in Linux.

My results are even worse than yours: with Amiri (version 0.102) the digits are enclosed by the end of ayah mark on the first two lines, but are displayed overlapping.

Comment 25

7 years ago
(In reply to Simon Montagu from comment #24)
> My results are even worse than yours: with Amiri (version 0.102) the digits
> are enclosed by the end of ayah mark on the first two lines, but are
> displayed overlapping.

That is a bug in the font, if you use v0.101 it should be fine.

Comment 26

7 years ago
If this is going through HarfBuzz, I expect it to be broken.  Because HarfBuzz flips the Arabic run to RTL before processing OpenType features.  Which apparently is not what fonts expect.

Comment 27

7 years ago
But, Behdad, since the digits and the mark are LTR there shouldn't be any flipping, no?

Comment 28

7 years ago
HarfBuzz knows that Arabic OpenType is supposed to be run on logical RTL glyph order.  So when it sees LTR Arabic, it first flips it to RTL then applies OpenType.  Which wouldn't work in this case...

Comment 29

7 years ago
OK, I understand that, what is puzzling me is the inconsistencies between end of ayah and other signs in Firefox, HarfBuzz’s command line tools give consistent results. Anyway, do you expect this to be changed soon? I now have a version of the font that works with HarfBuzz’s current behavior as well, if it will take time to change it.

Comment 30

7 years ago
Well, I'll fix it when I know how to do so without breaking LTR Arabic text.  No idea right now.
You need to log in before you can comment on or make changes to this bug.