Bug 94496 - GC.drawString/Text() is inconsistent
Summary: GC.drawString/Text() is inconsistent
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2005-05-10 15:50 EDT by Pratik Shah CLA
Modified: 2008-06-10 12:16 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Shah CLA 2005-05-10 15:50:46 EDT
Does GC.drawString/Text() take Bidi into account?  Consider the following 
snippet of code (for a RIGHT_TO_LEFT canvas):

canvas.addPaintListener(new PaintListener() {
	public void paintControl(PaintEvent e) {
		e.gc.drawString("Done.", 0, 0);
	}
});

What is the correct/expected behaviour in this case?  I am seeing "Done." on 
SLES 9.0 GTK2 and on my Windows XP machine, but ".Done" on Randy's Windows XP 
machine.  We're trying to figure out what the correct behaviour is and why 
there's a difference between the two Windows XP machines.  The only reason we 
can think of is that Randy has the Arabic language pack installed on his 
machine, and I don't.

If the correct behaviour is "Done." what is the purpose of setting this RTL 
style bit on the GC?
Comment 1 Randy Hudson CLA 2005-05-12 10:01:27 EDT
According to the 3.1 plan, a style of RIGHT_TO_LEFT is only supported on win32. 
So, the relevant part of this bug is the difference between my XP output and 
Pratik's XP output.

It is worth noting that Pratik attempted to install the Arabic language pack on 
his machine, and the installation failed. So he has less Arabic support than I 
have. He may also have corrupted windows, but it is worth testing on a plain 
English XP install.
Comment 2 Felipe Heidrich CLA 2005-05-12 11:31:33 EDT
Steve, you have a plain English XP install, can you test this ?
In my machine, arabic enabled, I got ".Done".
Comment 3 Pratik Shah CLA 2005-05-12 11:48:56 EDT
I tried this on my English-only XP machine at home and I got ".Done" as well.
Comment 4 Randy Hudson CLA 2005-05-12 15:03:29 EDT
The Linux bug is not a supported RTL platform.  Marking as INVALID until we 
find some win32 box which shows the problem but does not have a failed Arabic 
installation. Reopen (anyone) if you find such a box.
Comment 5 Pratik Shah CLA 2005-05-20 18:03:25 EDT
I reproduced this on another co-worker's machine.  He has a brand new T42; 
never attempted to install Arabic.
Comment 6 Felipe Heidrich CLA 2005-05-20 18:11:34 EDT
What is a T42 ? any service pack installed ? uniscribe dll version ?
Comment 7 Randy Hudson CLA 2005-05-23 10:55:08 EDT
T42 is an IBM Thinkpad. It has the "approved" coorporate version of XP 
installed, along with other "standard client software". It is not setup for IME.
Comment 8 Pratik Shah CLA 2005-05-23 11:27:50 EDT
Felipe, how do I find out the uniscribe dll version?
Comment 9 Felipe Heidrich CLA 2005-05-24 11:23:37 EDT
Select this file C:\WINDOWS\system32\usp10.dll and press ALT+ENTER
You can also use WINDOWS_KEY+PRINT_SCREEN_KEY to get system info, it will tell 
either or not service pack is install.
Comment 10 Pratik Shah CLA 2005-05-24 12:50:38 EDT
1.0409.2600.1106 (xpsp1.020828-1920) on my computer
Comment 11 Felipe Heidrich CLA 2005-05-24 14:13:17 EDT
It doesn't seem to be the problem. I have version 1.0409.2600.1106 of 
USP10.dll and I couldn't reproduce the problem.
Comment 12 Felipe Heidrich CLA 2008-06-10 12:16:37 EDT
closing as works for me.