Bug 149043 - Noncanonical Devanagari rendered poorly
Summary: Noncanonical Devanagari rendered poorly
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Safari 8
Hardware: Unspecified Unspecified
: P2 Minor
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-10 13:37 PDT by David Kamholz
Modified: 2022-02-10 19:43 PST (History)
6 users (show)

See Also:


Attachments
test case with Devanagari in visual order (65 bytes, text/html)
2015-09-10 13:51 PDT, David Kamholz
no flags Details
Rendering of testcase-visual.html in Safari 8 (138.97 KB, image/png)
2015-09-10 13:51 PDT, David Kamholz
no flags Details
Minimal test case with Devanagari in canonical order (65 bytes, text/html)
2015-09-10 13:52 PDT, David Kamholz
no flags Details
Rendering of testcase-canonical.html in Safari 8 (139.26 KB, image/png)
2015-09-10 13:52 PDT, David Kamholz
no flags Details
Rendering of testcase-visual.html in Safari 9 (32.42 KB, image/png)
2015-09-10 14:44 PDT, Myles C. Maxfield
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kamholz 2015-09-10 13:37:22 PDT
Safari 8 incorrectly renders "<p>&#x093f;&#x0938;</p>" by incorrectly placing "&#x0938;" in the right margin. The issue seems to be that these Devanagari characters are encoded in visual order rather than logical order. The canonical, logical order of "&#x0938;&#x093f;" renders correctly. However, the visual order is sometimes used, especially by people less familiar with the prescribed logical order of Devanagari characters in Unicode. The visual order, though in some sense "wrong", should therefore not fail so spectacularly. This case was, in fact, handled more gracefully in Safari 7; the issue seems to have been introduced in Safari 8.
Comment 1 BJ Burg 2015-09-10 13:46:21 PDT
cc: myles

It would be helpful if you put together a minimal testcase.html that demonstrates the problem, which can be quickly loaded on different browser versions for identifying the regression.

Screenshots of the expected and actual output are also very useful.
Comment 2 David Kamholz 2015-09-10 13:51:06 PDT
Created attachment 260949 [details]
test case with Devanagari in visual order
Comment 3 David Kamholz 2015-09-10 13:51:49 PDT
Created attachment 260950 [details]
Rendering of testcase-visual.html in Safari 8
Comment 4 David Kamholz 2015-09-10 13:52:16 PDT
Created attachment 260951 [details]
Minimal test case with Devanagari in canonical order
Comment 5 David Kamholz 2015-09-10 13:52:34 PDT
Created attachment 260952 [details]
Rendering of testcase-canonical.html in Safari 8
Comment 6 David Kamholz 2015-09-10 13:52:56 PDT
OK, here you go. The testcase-visual* files show the problem case and how it renders. The testcase-canonical* files show the correct rendering. testcase-visual.html should render the same as testcase-canonical.html, but does not in Safari 8. (It does in Safari 7 and Chrome 45.)
Comment 7 Myles C. Maxfield 2015-09-10 14:36:22 PDT
Safari 9 has very different behavior here than Safari 8.
Comment 8 Myles C. Maxfield 2015-09-10 14:38:07 PDT
Safari 9 renders this the same way as native Core Text, which means that this is a CoreText bug.
Comment 9 Myles C. Maxfield 2015-09-10 14:44:21 PDT
Created attachment 260957 [details]
Rendering of testcase-visual.html in Safari 9
Comment 10 Radar WebKit Bug Importer 2015-09-10 14:44:38 PDT
<rdar://problem/22650624>
Comment 11 Jonathan Pool 2015-09-10 14:46:26 PDT
Same failure with the nonstandard character pair आा (U+0906, U+093e), where an inversion of their order is not an issue.
Comment 12 Jonathan Pool 2015-09-10 18:50:57 PDT
Single Devanagari spacing dependent characters in center-aligned-text table cells are displayed against the left (if their logically prior character would be to their right) or right (if their logically prior character would be to their left) edge of the cell and force the column width to be about 1100 pixels. Code points appearing at the right edge include 0901, 0902, 0903, 093c, 093e, 0940, 0941, 0942, 0943, 0945, 0946, 0947, 0948, 0949, 094a, 094b 094c, 094d, and 0953. A code point appearing at the left edge is 093f.
Comment 13 Brent Fulgham 2022-02-10 19:43:29 PST
The fix for this issue was needed outside the WebKit project, therefore this is being resolved as 'Moved'.

The relevant experts in the CoreText component feel that this behavior is correct.