Closed Bug 689736 Opened 13 years ago Closed 13 years ago

parentheses are flipped in RTL (e.g. Hebrew) text

Categories

(Core :: Layout: Text and Fonts, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: tsahi_75, Assigned: jfkthame)

Details

(Keywords: rtl)

Attachments

(2 files)

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.
Component: Layout → Layout: Text
QA Contact: layout → layout.fonts-and-text
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.
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.
Assignee: nobody → jfkthame
Attachment #563694 - Flags: review?(smontagu)
(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.
Attachment #563733 - Flags: review?(smontagu)
Attachment #563694 - Flags: review?(smontagu) → review+
Attachment #563733 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/658986bab59d
https://hg.mozilla.org/mozilla-central/rev/a256a4174461
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: