Hello, In Webkit browsers, including Chrome, Old Turkic text does not render correctly. It should be rendered from Right-to-Left, but we see it as LTR as usual. Old Turkic block was introduced with Unicode 5.2, and Gecko based browsers render it correctly. Sample texts: http://fankibiber.wordpress.com You can download the required fonts from here: http://bitigchi.tumblr.com/downloads You can see the difference in rendering when tried with Firefox and Safari. Thank you.
Created attachment 110854 [details] Safari: Not rendered correctly
Created attachment 110856 [details] Firefox: Rendered correctly Although the font is different here, it is clear that the letters of the Safari screenshot here are right aligned on the first line.
<rdar://problem/10281541>
InlineIterator operates on UTF-16 code units rather than on characters. Since Old Turkic is encoded using surrogate pairs, InlineIterator::direction() incorrectly returns LeftToRight (for each of the two surrogates) instead of RightToLeft.
This is a very annoying bug. Is there any info on when this can be fixed?
!Ping!
Created attachment 238440 [details] Patch
Mitz asked me to look at this bug, so I did. Patch isn’t ready to land because we need some regression tests; we need to write tests that don’t require installing a font.
Also need to measure performance to see if I slowed things down.
Comment on attachment 238440 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238440&action=review > Source/WebCore/rendering/InlineIterator.h:436 > + if (LIKELY(U16_IS_SINGLE(codeUnit))) > + return u_charDirection(codeUnit); If this code path is really hot, then we should have a faster patch so we don't have to call into u_charDirection for common characters.
(In reply to comment #8) > Mitz asked me to look at this bug, so I did. Patch isn’t ready to land because we need some regression tests; we need to write tests that don’t require installing a font. Great news anyway! Thank you very much!
Created attachment 238599 [details] Patch
Committed r173943: <http://trac.webkit.org/changeset/173943>
Just for info, has this landed on a Safari release yet? I don't have an OS X machine at the moment, just wanted to check. Thanks in advance.