Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 134981

Summary: Bidi3.2: Text inside Geoshapes diagram objects is not shaped nor ordered.
Product: [Eclipse Project] Platform Reporter: Ahmed Farrag <afarrag>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: aboualy, camle, eclipse.felipe, fuse, grant_gayed, kitlo, Lina.Kemmel, mfadl, snorthov, steven.wasleski, steveshaw
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
fig1
none
fig2
none
testing the advanced graphics
none
diagram with advanced graphics OFF
none
screenshot showing Arabic characters correctly displayed inside geoshape diagrams none

Description Ahmed Farrag CLA 2006-04-05 05:14:32 EDT
Build date: 31/03/06
OS: RHEL 4

Description:

Arabic Text inside the Geoshapes diagram objects is not shaped or ordered.  Also, the edit, copy, cut functionalities are not functioning. 

Steps to recreate the problem:

1) Create general project.
2) Create new Geoshapes diagram.
3) Create a note or an object from the palette on the right, draw any object and type Arabic text inside it. To write the text similar to one in screenshot, use the following key sequence:
First, change your keyboard layer to Arabic then type the following "hgha;hg ydv lrf".

Expected output:

The text inside the objects should be ordered and shaped, see the attached "fig1" for the correct behavior. The user should be able to edit, cut, and copy Arabic text inside these shapes. 

Actual output:

The text inside the objects are not ordered nor shaped as shown in attached fig2.  Cut, copy, and paste functionalities are not functioning correctly.
Comment 1 Ahmed Farrag CLA 2006-04-05 05:15:12 EDT
Created attachment 37711 [details]
fig1
Comment 2 Ahmed Farrag CLA 2006-04-05 05:16:47 EDT
Created attachment 37712 [details]
fig2
Comment 3 Mohammed Mostafa CLA 2006-04-06 17:51:17 EDT
would you please confirm that you can write arabic and it is displayed correctly in the "Text Editor" application found in Utilities/Editor
Comment 4 Mohammed Mostafa CLA 2006-04-06 17:59:47 EDT
(In reply to comment #3)
> would you please confirm that you can write arabic and it is displayed
> correctly in the "Text Editor" application found in Utilities/Editor

Or any Text editor
Comment 5 Mohammed Mostafa CLA 2006-04-07 11:07:40 EDT
One more question; 
Was the text displayed correctly during editing then the problem shows up after you hit enter?
Comment 6 Ahmed Farrag CLA 2006-04-09 03:46:45 EDT
(In reply to comment #4)
> (In reply to comment #3)

Mohammed,

I can write arabic in text editors without any problem, and it is displayed correctly.
Comment 7 Ahmed Farrag CLA 2006-04-09 03:48:14 EDT
(In reply to comment #5)
> One more question; 
> Was the text displayed correctly during editing then the problem shows up after
> you hit enter?

Yes, the text was displayed correctly during editing then the problem came up after hitting the enter button
Comment 8 Steven R. Shaw CLA 2006-04-10 12:04:25 EDT
accidently assigned to myself
Comment 9 Mohammed Mostafa CLA 2006-04-11 16:54:50 EDT
The problem seems to be related to the Advanced Graphics support on SWT.
I tried to turn off the advanced graphics flag programatically and i got the Arabic text displayed correctly on RHL4 + GTK  + Cairo Lib 2.0 .
we need to retest this use case again on M6 with the Anti Aliasing flag turned of if this fix the problem then the defect severty should not be Critical any more.
I'll be contacting the SWT team to see what do they think about this issue and the possibilty of having a solution for it.
Comment 10 Masayuki Fuse CLA 2006-04-12 04:41:47 EDT
On my RHEL4 Japanese locale, entered DBCS isn't displayed with default font "Sans". Before entering DBCS text, changing to "Kochi Gothic" font that is Japanese TrueType font links to the "Sans" seems to solve my issue.

Did you ever try to change the font?
Comment 11 Mohammed Mostafa CLA 2006-04-12 11:10:49 EDT
Created attachment 38413 [details]
testing the advanced graphics
Comment 12 Mohammed Mostafa CLA 2006-04-12 11:14:03 EDT
Actually if teh string had BIDI text in it and teh advanced graphics is used nothing show up on the screen. if the advanced graphics is not used it works fine
Code to reproduce the problem using SWT only is provided by Felipe Heidrich. This looks like SWT problem
Comment 13 Ahmed Farrag CLA 2006-04-13 05:12:57 EDT
(In reply to comment #10)
>I tried to change the font but nothing changed, moreover, when trying to use some fonts as "Courier" and hitting the enter button, the whole text disappears.
Comment 14 Mohammed Mostafa CLA 2006-04-13 08:52:19 EDT
(In reply to comment #13)
> (In reply to comment #10)
> >I tried to change the font but nothing changed, moreover, when trying to use some fonts as "Courier" and hitting the enter button, the whole text disappears.

This is similar to what i see on my machine, but i do not even neeed to change the font. If i just use english text every thing works fine; but if i use Bidi every thing disappear.
Turnning off advanced graphics in GMF will be possible in M6 by turnning off the Anti Aliasing feture from the preferences.
still working with the SWT team to find a better solution 
Image attached to show the result i get after i turn off advanced graphics
Comment 15 Mohammed Mostafa CLA 2006-04-13 09:06:30 EDT
Created attachment 38507 [details]
diagram with advanced graphics OFF
Comment 16 Mohammed Mostafa CLA 2006-04-13 18:05:58 EDT
Felipe suggested that may be updating the Cairo lib will help 
it can be downloaded from from :
ftp://ftp.gtk.org/pub/gtk/v2.8/dependencies/

based on the last discussion i had with Felip, i'll change the  component on this bugizlla to SWT
Comment 17 Felipe Heidrich CLA 2006-04-17 12:02:14 EDT

*** This bug has been marked as a duplicate of 136472 ***
Comment 18 Ahmed Farrag CLA 2006-05-28 12:15:52 EDT
Keeping as a seperate bug as it is very critical defect.
Comment 19 Grant Gayed CLA 2006-05-29 13:51:19 EDT
Is this a duplicate of bug 136472?  If so then it should be marked as such, since the active discussion about this issue, including patches that address the problem, are over there.
Comment 20 Steven Wasleski CLA 2006-05-30 09:06:52 EDT
Ahmed, if this bug really is a duplicate of bug 136472, it does not make any sense to reopen it.

Felipe and Grant, if you are certain this is a dup of bug 136472, please re-resolve it as such.
Comment 21 Ahmed Farrag CLA 2006-06-01 02:24:47 EDT
(In reply to comment #20)

Steven, this defect is very critical as mentioned above, it should be fixed in R3.2 . We can't exit testing with these critical bugs unresolved.
Comment 22 Felipe Heidrich CLA 2006-06-01 10:29:36 EDT
Ahmed, are you able to apply the patch from bug 136472 and verify if it fixes this problem? Let me know if you need help.
Please, refer to the eclipse 3.2 end game plan, the process to include a fix in the build is really hard at this point.
Comment 23 Felipe Heidrich CLA 2006-06-01 16:51:30 EDT
this a duplicate. we are tracking this issue on Bug 136472, which you are already on. Please don't reopen this unless this is different issue.

*** This bug has been marked as a duplicate of 136472 ***
Comment 24 Ahmed Farrag CLA 2006-06-08 11:28:34 EDT
(In reply to comment #22)

Felipe,
The geoshape diagrams now display Arabic characters properly (correctly shaped and ordered) without any corruption using eclipse RC7 build and without applying the patch (see the attached figure). 

I will install this patch to see whether it would resolve other defects that depends on bug# 136472, and keep you up-to-date.

This bug has been fixed, verified on RC7 build.
Comment 25 Ahmed Farrag CLA 2006-06-08 11:35:13 EDT
Created attachment 43870 [details]
screenshot showing Arabic characters correctly displayed inside geoshape diagrams
Comment 26 Ahmed Farrag CLA 2006-06-08 13:17:32 EDT
I guess this problem should not depend on bug# 136472
Comment 27 Ahmed Farrag CLA 2006-06-08 13:18:21 EDT
This bug has been fixed. Verified on eclipse RC7 build.
Comment 28 Ahmed Farrag CLA 2006-06-08 13:18:38 EDT
Closing...