CLOSED FIXED 3545
Incorrect reordering and mirroring in visually-ordered Hebrew
https://bugs.webkit.org/show_bug.cgi?id=3545
Summary Incorrect reordering and mirroring in visually-ordered Hebrew
mitz
Reported 2005-06-15 09:06:56 PDT
Summary: Under certain conditions, reordering of the letters or Unicode mirroring occurs in visually- ordered Hebrew, instead of plain left-to-right ordering and no mirroring. To reproduce: Open the testcase in Safari and in Firefox Expected: Safari should render it like Firefox does (that is, characters should be rendered from left to right unchanged and in the order in which they appear in the source). Actual: Line 1: the full stop (.) and Hebrew letter Bet are rendered in the wrong order. Line 2: the left parenthesis is rendered as a right parenthesis. Line 3: the letter a and the Hebrew letter Aleph are rendered in the wrong order. Line 4: there is no space between the hyphen-minus (-) and the Hebrew letter Aleph. See screenshots for expected and actual. Analysis: Currently visual ordering is accomplished by reversing the order of characters prior to drawing, assuming ATSUI will re-reverse. The problem is that sometimes ATSUI's transformation is not as trivial, and includes more complex reordering and mirroring. The proposed patch accomplishes visual ordering by enclosing the text between Unicode LRO and PDF characters instead of reversing it. The LRO effectively tells ATSUI not to do any re-ordering or mirroring but just render visually from left to right. Since this is a rendering-only (not layout) bug, there's no layout test.
Attachments
testcase (411 bytes, text/html)
2005-06-15 09:08 PDT, mitz
no flags
actual rendering (1.66 KB, image/png)
2005-06-15 09:09 PDT, mitz
no flags
expected rendering (1.63 KB, image/png)
2005-06-15 09:10 PDT, mitz
no flags
Proposed patch (1.99 KB, patch)
2005-06-15 09:25 PDT, mitz
rjw: review+
revised patch (2.30 KB, patch)
2005-06-16 23:24 PDT, mitz
rjw: review+
mitz
Comment 1 2005-06-15 09:08:06 PDT
Created attachment 2362 [details] testcase
mitz
Comment 2 2005-06-15 09:09:36 PDT
Created attachment 2363 [details] actual rendering
mitz
Comment 3 2005-06-15 09:10:08 PDT
Created attachment 2364 [details] expected rendering
mitz
Comment 4 2005-06-15 09:25:05 PDT
Created attachment 2366 [details] Proposed patch
Nicholas Shanks
Comment 5 2005-06-15 10:01:20 PDT
With the current ToT, not having applied this patch, I see line 2 rendered correctly not as shown or described above.
mitz
Comment 6 2005-06-15 10:16:21 PDT
(In reply to comment #5) > With the current ToT, not having applied this patch, I see line 2 rendered correctly not as shown or > described above. Could this be due to the ATSUI issue mentioned in <http://bugzilla.opendarwin.org/show_bug.cgi? id=3435#c6>? I took the screenshot with the Standard font set to Lucida Grande 14.
Richard Williamson
Comment 7 2005-06-16 16:11:16 PDT
Comment on attachment 2366 [details] Proposed patch Looks good. It would be better to replace 0x202D and 0x202C with a #define.
mitz
Comment 8 2005-06-16 23:24:30 PDT
Created attachment 2417 [details] revised patch Replaced 0x202C and 0x202D with a #define as suggested by rjw.
Richard Williamson
Comment 9 2005-06-17 10:13:36 PDT
Comment on attachment 2417 [details] revised patch Good to go. I'll commit. Thanks Mitz.
Chris Petersen
Comment 10 2005-06-18 23:13:48 PDT
Reporter, please mark this bug as Verified if this issue has been fixed in the latest TOT Webkit.
Note You need to log in before you can comment on or make changes to this bug.