when displaying hebrew text which contains parentheses on android, the direction of the parentheses is reversed. the opening parentheses looks like a closing one, and vice versa. kind of like )text in parentheses(. we had a bug like this years ago on the x86 platform.
Hi Tsahi. Thanks for the bug report. Can you please add a simple testcase and a screenshot of the issue? Thanks.
This can be seen, for example, in the second paragraph of http://www.unicode.org/standard/translations/hebrew.html. The problem is that Hebrew requires "mirroring" of characters such as parentheses, but the simple gfxFT2Fonts backend does not have any support for this. The simplest solution will be to turn on Harfbuzz rendering for Hebrew on Android.
Created attachment 563694 [details] [diff] [review] patch, enable harfbuzz on android for hebrew and thai This sets the harfbuzz script flags to include Hebrew. This provides the mirroring support needed for Hebrew. While we're here, it also enables HB for Thai (like we do on OS X). As we don't have an alternative platform backend that might do a nicer job of Thai, there's no reason to hold off on sending it through HB as well.
(In reply to Jonathan Kew (:jfkthame) from comment #3) > This provides the mirroring support needed for Hebrew. I am not an expert, but doesn't we need to do the same for Farsi and Arabic as well? (Ehsan?)
(In reply to Tomer Cohen :tomer from comment #4) > I am not an expert, but doesn't we need to do the same for Farsi and Arabic > as well? (Ehsan?) Sure. It's the same case for Arabic and Persian.
Okay, my mistake. I see that in the patch the code 71 include all these languages.
Created attachment 563733 [details] [diff] [review] reftest for parens within hebrew
https://hg.mozilla.org/integration/mozilla-inbound/rev/658986bab59d (patch) https://hg.mozilla.org/integration/mozilla-inbound/rev/a256a4174461 (reftest)
This caused some reftests to "unexpectedly" pass on Android: REFTEST TEST-UNEXPECTED-PASS | http://10.250.48.201:30064/tests/layout/reftests/bidi/bidi-004.html | image comparison (==) REFTEST TEST-UNEXPECTED-PASS | http://10.250.48.201:30064/tests/layout/reftests/bidi/bidi-004-j.html | image comparison (==) REFTEST TEST-UNEXPECTED-PASS | http://10.250.48.201:30064/tests/layout/reftests/bidi/bidi-006.html | image comparison (==) REFTEST TEST-UNEXPECTED-PASS | http://10.250.48.201:30064/tests/layout/reftests/bidi/bidi-006-j.html | image comparison (==) REFTEST TEST-UNEXPECTED-PASS | http://10.250.48.201:30064/tests/layout/reftests/bidi/386339.html | image comparison (==) As these are all tests that use Hebrew text, it's nice that they now pass. :) So I pushed an update to remove the fails-if(Android) annotations from the reftest manifest: https://hg.mozilla.org/integration/mozilla-inbound/rev/c38b54d06778