Issue 105685 in chromium: Arabic text align incorrect

66 views
Skip to first unread message

chro...@googlecode.com

unread,
Nov 29, 2011, 6:22:24 AM11/29/11
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: OS-Linux Area-Undefined Type-Bug Pri-2

New issue 105685 by net...@gmail.com: Arabic text align incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Chrome Version : 15.0.874.121
OS Version: Ubuntu 11.10
URLs (if applicable) : http://www.bbc.co.uk/arabic/
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Firefox: OK
Opera: OK


UserAgentString: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML,
like Gecko) Chrome/15.0.874.121 Safari/535.2

See screenshot (Chrome, Firefox then Opera), this happen on every Arabic
web site.


Attachments:
Screenshot at 2011-11-29 06:07:36.png 416 KB
Screenshot at 2011-11-29 06:08:12.png 417 KB
Screenshot at 2011-11-29 06:09:48.png 321 KB

chro...@googlecode.com

unread,
Nov 29, 2011, 6:30:27 AM11/29/11
to chromi...@chromium.org
Updates:
Labels: -Area-Undefined Area-WebKit Feature-I18N WebKit-RTL

Comment #1 on issue 105685 by asvi...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Dec 4, 2011, 8:35:09 PM12/4/11
to chromi...@chromium.org
Updates:
Status: Assigned
Owner: ba...@chromium.org

Comment #11 on issue 105685 by ba...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

This might be a duplicate of
http://code.google.com/p/chromium-os/issues/detail?id=13717.

chro...@googlecode.com

unread,
Dec 15, 2011, 9:18:07 AM12/15/11
to chromi...@chromium.org
Updates:
Cc: beh...@chromium.org

Comment #16 on issue 105685 by ba...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Just for testing, I installed BBCNassim and IranianSans(the font used in
http://farsitel.com/fa/faq.html) and checked the rendering result for the
following html:

<style>
@font-face {
font-family: 'bbc';
src: local('BBCNassim');
}
@font-face {
font-family: 'irsans';
src: local('Iranian Sans');
}
div {
font-size: 36pt;
border: 1px solid;
width: 100px;
direction: rtl;
}
</style>
BBCNassim:
<div style="font-family: bbc">
&#x062D;&#x0631;&#x0643;
</div>
Iranian Sans:
<div style="font-family: irsans">
&#x062D;&#x0631;&#x0643;
</div>
Not specified:
<div>
&#x062D;&#x0631;&#x0643;
</div>

The result of Chromium ToT and Firefox are attached. It looks like Chromium
can't handle kerning with some specific fonts (e.g. BBC Nassim and Iranian
Sans).

@behdad, do you have any ideas?

Attachments:
Screenshot-Chromium.png 20.1 KB
Screenshot-Firefox.png 30.9 KB

chro...@googlecode.com

unread,
Dec 18, 2011, 10:45:29 PM12/18/11
to chromi...@chromium.org

Comment #18 on issue 105685 by ba...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

As far as I checked, complex text path is used for above testcase so there
might be a bug in (old) Harfbuzz with some fonts.

chro...@googlecode.com

unread,
Apr 29, 2012, 9:52:13 AM4/29/12
to chromi...@chromium.org

Comment #21 on issue 105685 by dr3...@gmail.com: Arabic text align incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

please fix this annoying issue soon

chro...@googlecode.com

unread,
May 2, 2012, 9:27:00 PM5/2/12
to chromi...@chromium.org

Comment #22 on issue 105685 by benjamin...@gmail.com: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

If it's a bug in the old Harfbuzz, maybe this could be an extra incentive
to speed up the switch to Harfbuzz-ng?

chro...@googlecode.com

unread,
May 7, 2012, 11:02:48 AM5/7/12
to chromi...@chromium.org

Comment #23 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

To me this sounds like a bug in Chromium/Webkit rather than HarfBuzz per
se. It looks like the code is not computing glyph positions using the
advance of the glyph, not what HarfBuzz returns. Let me take a quick look
and see if that's obviously the case...

chro...@googlecode.com

unread,
May 7, 2012, 11:20:53 AM5/7/12
to chromi...@chromium.org

Comment #24 on issue 105685 by ba...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Yes. It seems that the cause isn't in HarfBuzz. I'll take a look when I
have time.

chro...@googlecode.com

unread,
May 7, 2012, 11:42:54 AM5/7/12
to chromi...@chromium.org

Comment #25 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Snap. I found the logic error.

chro...@googlecode.com

unread,
May 7, 2012, 11:54:54 AM5/7/12
to chromi...@chromium.org

Comment #26 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Humm. Maybe not. Investigating more.

chro...@googlecode.com

unread,
May 8, 2012, 2:22:59 PM5/8/12
to chromi...@chromium.org

Comment #27 on issue 105685 by dr3...@gmail.com: Arabic text align incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

please FIX this issue . chrome on linux is not usable on any site that uses
RTL text

chro...@googlecode.com

unread,
May 16, 2012, 3:45:46 PM5/16/12
to chromi...@chromium.org

Comment #30 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Ok, progress. I just confirmed that the kern bug will be fixed when we
cherrypick this fix from upstream:

http://cgit.freedesktop.org/harfbuzz.old/commit/?id=4717a185539d678b2040820e05bfe065d5d7c16d

How stupid of me to not think of that change before...

I still see IranNastaliq rendering way off, but Iranian Sans looks good.

Test:

http://behdad.org/arabic.html

Who wants to do the patching?

chro...@googlecode.com

unread,
May 16, 2012, 8:21:23 PM5/16/12
to chromi...@chromium.org

Comment #35 on issue 105685 by ba...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Behdad and Jungshik,

Thank you so much for fixing the bug! Jungshik, could you cc me when you
create the CL? I'd like to see whether we need rebaselines for the existing
layout tests.

chro...@googlecode.com

unread,
May 17, 2012, 3:57:41 AM5/17/12
to chromi...@chromium.org

Comment #36 on issue 105685 by dr.khale...@gmail.com: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

@Behdad: Arabic Droid fonts should show kerning issue, Scheherazade has a
cursive anchor for its lam-alef, so the cursive issue should show there as
well.

chro...@googlecode.com

unread,
May 18, 2012, 9:38:35 PM5/18/12
to chromi...@chromium.org

Comment #37 on issue 105685 by bugdro...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685#c37

The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=138001

------------------------------------------------------------------------
r138001 | js...@chromium.org | Fri May 18 18:04:27 PDT 2012

Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/harfbuzz/chromium.patch?r1=138001&r2=138000&pathrev=138001
M
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/harfbuzz/README.chromium?r1=138001&r2=138000&pathrev=138001
M
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/harfbuzz/src/harfbuzz-shaper.cpp?r1=138001&r2=138000&pathrev=138001

Fix the alignment issue with Arabic when a font has kerning or cursive gsub

Patch by beh...@chromium.org.



Will add a webkit layout test for Arabic alignment as soon as we find
a font that can be included in Webkit LayoutTests.

BUG=105685
TEST= http://www.bbcarabic.com should be rendered the same way as is done
by Firefox on Linux. Paragraphs should be right justified and should not
overlap with photos or other elements next to them. See the screenshots
attached in the bug report.
TBR=bashik

Review URL: https://chromiumcodereview.appspot.com/10382212
------------------------------------------------------------------------

chro...@googlecode.com

unread,
May 31, 2012, 9:25:09 PM5/31/12
to chromi...@chromium.org
Updates:
Status: Fixed
Labels: -Action-ReductionNeeded Mstone-20 Merge-Requested

Comment #39 on issue 105685 by js...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Thank you for the pointer to amirifont and other fonts.

In the meantime, I'm requesting for merge to M20 branch (1132 branch).
Arabic speakers have suffered from this issue very long and it'd be nice to
get it fixed in upcoming M20.



chro...@googlecode.com

unread,
May 31, 2012, 9:34:09 PM5/31/12
to chromi...@chromium.org
Updates:
Labels: ReleaseBlock-Stable

Comment #40 on issue 105685 by js...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

chro...@googlecode.com

unread,
Jun 3, 2012, 1:19:44 PM6/3/12
to chromi...@chromium.org
Updates:
Cc: x...@chromium.org le...@chromium.org

Comment #41 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Issue 130527 has been merged into this issue.

chro...@googlecode.com

unread,
Jun 6, 2012, 6:15:33 PM6/6/12
to chromi...@chromium.org
Updates:
Status: Verified
Cc: kr...@chromium.org

Comment #44 on issue 105685 by son...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Verified on build "2268.57.0"

Attachments:
screenshot-20120606-150341.png 383 KB

chro...@googlecode.com

unread,
Jun 7, 2012, 10:49:28 AM6/7/12
to chromi...@chromium.org

Comment #45 on issue 105685 by dr3...@gmail.com: Arabic text align incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

WOW ... THANK YOU FOR THE FIX ... WHEN Will it hit google chrome !! ???

chro...@googlecode.com

unread,
Jun 7, 2012, 12:53:00 PM6/7/12
to chromi...@chromium.org

Comment #46 on issue 105685 by js...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

The latest beta channel release ( 20.0.1132.27 ) has it. See
http://googlechromereleases.blogspot.com/2012/06/beta-channel-update.html#links
and

http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/branches/1132/src&range=140692:139451&mode=html
)

It'll be included in M20 stable channel release when it's released in a few
weeks.


chro...@googlecode.com

unread,
Jun 7, 2012, 12:56:51 PM6/7/12
to chromi...@chromium.org

Comment #47 on issue 105685 by js...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Needless to say, the dev channel has had it for a while (since May 21 :
21.0.1145.0 )

chro...@googlecode.com

unread,
Jun 8, 2012, 3:39:39 AM6/8/12
to chromi...@chromium.org

Comment #48 on issue 105685 by dr3...@gmail.com: Arabic text align incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

so if i use google chrome what version should i upgrade now ?

chro...@googlecode.com

unread,
Jun 12, 2012, 1:21:10 PM6/12/12
to chromi...@chromium.org
Updates:
Cc: song...@chromium.org js...@chromium.org r...@chromium.org

Comment #50 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Issue 92792 has been merged into this issue.

chro...@googlecode.com

unread,
Jun 20, 2012, 9:13:18 AM6/20/12
to chromi...@chromium.org

Comment #51 on issue 105685 by beh...@chromium.org: Arabic text align
incorrect
http://code.google.com/p/chromium/issues/detail?id=105685

Issue 89041 has been merged into this issue.

Reply all
Reply to author
Forward
0 new messages