Window titles are misaligned in RTL languanges

Bug #141472 reported by Yotam Benshalom
52
This bug affects 2 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Fix Released
Low
compiz packagers

Bug Description

Binary package hint: compiz-core

Ubuntu Gutsy (also in previous version), xgl/fglrx.

When opening a window with a title text in RTL language, like Arabic or Hebrew,
the title text is shown with a huge offset to the right. In most cases, it
means that no text will be shown on the title bar at all. If the text is very long, I
can see parts of it on the right hand corner - and somewhat beyond it, outside
the borders of the window.
This is not a problem with a specific decoration manager, as it appears both on
gtk-decorator and emerald and was there with beryl and heliodor as well. This
problem affects other compiz plugins which use the title text, such as the various app
switchers: the rtl text is missing there as well.
I reported it in the past on the Beryl bugzilla, but they had replied that it
wasn't their problem. If this is a Gnome issue, where should I report it? What
part of Gnome is the culprit? In metacity there is no problem, and the RTL
titles are shown correctly just like LTR titles.

Reported upstream in Compiz bugzilla with demonstrating screenshots:
http://bugs.opencompositing.org/show_bug.cgi?id=482

Tags: rtl
description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I can not reproduce this for Hebrew. All the title texts are middle aligned. I tested with the latest gtk-window-decorator in gutsy. App switching for me works fine as well.

Changed in compiz:
status: New → Incomplete
Changed in compiz:
status: Unknown → Confirmed
Revision history for this message
Yotam Benshalom (benshalom) wrote :

Thank you for the quick response!
I checked this with various layouts of emerald.
First, this problem appears only with texts that begin with Hebrew (or Arabic, or Farsi) characters, and thus are recognised to be RTL.
Second, I have tested this with several configurations of title bar elements in emerald, editable in emerald theme manager. I attach image showing the problem. Please ignor the screenshot-taking window which is partially seen on top of the relevant window - its just fade plugin not erasing it on time. The numbers on the image represent the following cases:
1. When the layout is: {left - icon, text}{center - nothing}{right - buttons}, I can see the Hebrew text in its whole. However, it is aligned to the buttons on the right, not to the icon on the left as it should.
2. When the layout is: {left - text, icon}{center - nothing}{right - buttons}, things get whack y. The Icon appears around the middle of the title bar, and the text adjacent to the buttons to the right, but not right besides them as in case 1. Clearly some BiDi algorythm is working when it is not supposed to.
3. When the layout is {left - icon}{center - text}{right - buttons}, text disappears except cut-down leftovers, partially outside the window (note this on the image). This happens too if I place the text on the right portion.
It is worth mentioning that in all 3 cases, no text can be seen in the labels used by various switcher plugins.

Please check it out, using Hebrew-only string as a title bar (easily done if you give a folder a Hebrew name) and set the text to appear in the bar center (using appropriate gtk theme in case you use gtk-decorator, or editing/finding an emerald theme in case you use emerald).

Changed in compiz:
status: Incomplete → New
Changed in compiz:
status: Confirmed → Unknown
Changed in compiz:
status: Unknown → Confirmed
Changed in compiz:
assignee: nobody → compiz
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Haggai Eran (haggai-eran) wrote :

Hi,

I too am suffering from this problem. I use Ubuntu Interpid beta on an HP Pavilion dv1000 laptop with Intel 555GM graphics card. I've attached a screenshot that shows the problem - window titles when I log in to a Hebrew locale session aren't being shown. When I log in with an English locale everything is fine.

Thanks,
Haggai Eran

Changed in compiz:
status: Confirmed → Fix Released
Changed in compiz:
status: Fix Released → Confirmed
Revision history for this message
Yaron Tausky (yaront) wrote :

This bug seems to be fixed in Jaunty.

Changed in compiz (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This bug does not appear to be fixed according to upstream and report in bug 263231

summary: - Compiz RTL window titles are misaligned
+ Window titles are misaligned in RTL languanges
Changed in compiz (Ubuntu):
status: Fix Released → Triaged
Shahar Or (mightyiam)
tags: added: rtl
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Testing shows it fixed in Karmic.

Changed in compiz (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
abdullahc (sneetsher) wrote :

Hi,

I'm using: Ubuntu 10.04, Compiz 0.8.4. No problem in title text alignment (std theme, force it to left, I'm using English)

After installing Emerald and Enabling its themes:

- Titles start with LTR language no problem with them (even they contain some RTL text in the middle or the end)

- Titles start with RTL language are misplaced to right (I can see only its left part)

Revision history for this message
Ddorda (ddorda) wrote : Re: [Bug 141472] Re: Window titles are misaligned in RTL languanges

When not using compiz the problem of RTL titles happen again. so people that
don't uses effects in their Ubuntu have the title aligned to the wrong
place.

Revision history for this message
abdullahc (sneetsher) wrote :

It seems like GTK make affect on title positioning (make Direction as RTL, I don't know) when it detects an RTL text in the beginning; as in Text Boxes, text starts with RTL always aligned to right.

This does not happen when title forced to be aligned to left.

Revision history for this message
abdullahc (sneetsher) wrote :

@Ddorda

Yeah, you are right. I have check it in Ubuntu 9.10. Titles positioned correctly (compiz has no effect).

So why it came back in Ubuntu 10.04?

no longer affects: compiz
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.