The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla10

Status

()

Core
Layout: Text
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Tsahi Asher, Assigned: jfkthame)

Tracking

({rtl})

Trunk
mozilla10
ARM
Android
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
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.

Comment 1

6 years ago
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
(Assignee)

Comment 2

6 years ago
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.
(Assignee)

Comment 3

6 years ago
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.
Assignee: nobody → jfkthame
Attachment #563694 - Flags: review?(smontagu)

Comment 4

6 years ago
(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.

Comment 6

6 years ago
Okay, my mistake. I see that in the patch the code 71 include all these languages.
(Assignee)

Comment 7

6 years ago
Created attachment 563733 [details] [diff] [review]
reftest for parens within hebrew
Attachment #563733 - Flags: review?(smontagu)
Attachment #563694 - Flags: review?(smontagu) → review+
Attachment #563733 - Flags: review?(smontagu) → review+
(Assignee)

Comment 8

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/658986bab59d (patch)
https://hg.mozilla.org/integration/mozilla-inbound/rev/a256a4174461 (reftest)
Target Milestone: --- → mozilla10
Version: 6 Branch → Trunk
https://hg.mozilla.org/mozilla-central/rev/658986bab59d
https://hg.mozilla.org/mozilla-central/rev/a256a4174461
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
(Assignee)

Comment 10

6 years ago
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
Follow-up: https://hg.mozilla.org/mozilla-central/rev/c38b54d06778
You need to log in before you can comment on or make changes to this bug.