Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362565 - [JFace] TitleAreaDialog fails to render Czech 'položku' correctly on Windows
Summary: [JFace] TitleAreaDialog fails to render Czech 'položku' correctly on Windows
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 09:17 EDT by Dominic Evans CLA
Modified: 2012-07-04 10:42 EDT (History)
4 users (show)

See Also:


Attachments
Screenshot (15.79 KB, image/jpeg)
2011-11-01 09:22 EDT, Dominic Evans CLA
no flags Details
Bug362565Dialog.java (813 bytes, text/x-java)
2011-11-01 09:23 EDT, Dominic Evans CLA
no flags Details
New Dialog in Czech (40.42 KB, image/pjpeg)
2011-11-17 20:33 EST, Kit Lo CLA
no flags Details
Image to show the wrong character of Czech (56.41 KB, image/png)
2012-06-13 03:09 EDT, Jing Yao CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Evans CLA 2011-11-01 09:17:55 EDT
Build Identifier: 201109091335

If you set the title of a TitleAreaDialog to contain a ž \u017e character, it is not rendered correctly on Windows. It is correctly rendered on the rest of the dialog box, and the title is correctly rendered on other non-Windows platforms. I will attach a simple reduced test case to reproduce the issue. It was originally found on Eclipse 3.4.2, but still seems to be an issue even under 3.7.1
 
See http://www.fileformat.info/info/unicode/char/17e/index.htm for information on the character.

Reproducible: Always

Steps to Reproduce:
1. Execute the reduced test case on Windows.
2. Notice the rendering bug.
Comment 1 Dominic Evans CLA 2011-11-01 09:22:42 EDT
Created attachment 206264 [details]
Screenshot
Comment 2 Dominic Evans CLA 2011-11-01 09:23:37 EDT
Created attachment 206265 [details]
Bug362565Dialog.java
Comment 3 Remy Suen CLA 2011-11-03 10:37:13 EDT
(In reply to comment #1)
> Created attachment 206264 [details]
> Screenshot

It looks to me like that character cannot be rendered when the font is bold. Do you have this problem in other programs with a bold font?
Comment 4 Dominic Evans CLA 2011-11-03 11:08:11 EDT
(In reply to comment #3)
> (In reply to comment #1)
> > Created attachment 206264 [details] [details]
> > Screenshot
> 
> It looks to me like that character cannot be rendered when the font is bold. Do
> you have this problem in other programs with a bold font?

Indeed.

As this is a fairly common Czech character I would suggest the correct fix for this defect would be to specify a more complete default font value to use for `org.eclipse.jface.bannerfont` when running in Czech. I believe this should be possible by editing the jfacefonts_cs.properties files for Windows that are shipped in the org.eclipse.ui.nl1 plugin jar.
Comment 5 Remy Suen CLA 2011-11-17 16:14:32 EST
(In reply to comment #4)
> As this is a fairly common Czech character I would suggest the correct fix for
> this defect would be to specify a more complete default font value to use for
> `org.eclipse.jface.bannerfont` when running in Czech. I believe this should be
> possible by editing the jfacefonts_cs.properties files for Windows that are
> shipped in the org.eclipse.ui.nl1 plugin jar.

Kit, is there something we need to do here on the Eclipse side?
Comment 6 Kit Lo CLA 2011-11-17 20:33:38 EST
Created attachment 207191 [details]
New Dialog in Czech

Dominic, the default bannerfont for Windows XP in Eclipse 3.7 was:
org.eclipse.jface.bannerfont.0=Tahoma-bold-10

I did not have problem with the character in the dialog title.
Comment 7 Remy Suen CLA 2011-11-30 15:46:25 EST
Dominic, please feel free to reopen the bug if you have more information.
Comment 8 Jing Yao CLA 2012-06-13 03:07:12 EDT
Hi,

I got the same problem in our wizard. We just use "setTitle" method to set the strings in title area. We are also using the JFace jar from Eclipse 3.7.
Comment 9 Jing Yao CLA 2012-06-13 03:09:43 EDT
Created attachment 217252 [details]
Image to show the wrong character of Czech
Comment 10 Paul Webster CLA 2012-06-13 09:10:44 EDT
(In reply to comment #9)
> Created attachment 217252 [details]
> Image to show the wrong character of Czech

Are you running with the correct NL pack?  Is your banner font set to Tahoma-bold-10?  Is that installed on your system?

PW
Comment 11 Jing Yao CLA 2012-06-13 09:25:39 EDT
The system is Win2008. We didn't set font for the title. We simply just use the setTitle method provided by WizardPage. The string is just come from the properties file of Czech.
Comment 12 Paul Webster CLA 2012-06-13 09:27:50 EDT
(In reply to comment #11)
> The system is Win2008. We didn't set font for the title. We simply just use the
> setTitle method provided by WizardPage. The string is just come from the
> properties file of Czech.

Did you install the Czech language pack from Babel?

PW
Comment 13 Jing Yao CLA 2012-06-17 23:36:29 EDT
I guess no. Would you please point me where to download the NL Package for Czech? We will have a try. We are using 3.7. Thanks.
Comment 14 Kit Lo CLA 2012-06-18 00:12:23 EDT
The problem was not in the language pack. The problem was that Win2008 was not a supported platform for Eclipse 3.7. There was no "org.eclipse.jface.bannerfont.0" set for Win2008 for Czech, and the font fell back to the default of "MS Sans Serif-bold-10", which couldn't display some of the Czech characters properly.

Jing, is it possible to set your wizard title font to "Tahoma-bold-10"?
Comment 15 Jing Yao CLA 2012-06-18 00:29:30 EDT
I can have a try, but how to do that? I'm using the setTitle method, so I suppose I need to implement it and then how?
Comment 16 Jing Yao CLA 2012-06-18 00:37:31 EDT
Another question, will Win2008 be the supported platform for eclipse 4.2? So the problem should be solved in 4.2, right?
Comment 17 Paul Webster CLA 2012-06-18 07:45:54 EDT
(In reply to comment #16)
> Another question, will Win2008 be the supported platform for eclipse 4.2? So
> the problem should be solved in 4.2, right?

http://www.eclipse.org/projects/project-plan.php?planurl=http://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_2.xml#target_environments

Windows 7 and Windows XP are the supported platforms.

PW
Comment 18 Jing Yao CLA 2012-06-19 02:14:54 EDT
(In reply to comment #14)
> The problem was not in the language pack. The problem was that Win2008 was not
> a supported platform for Eclipse 3.7. There was no
> "org.eclipse.jface.bannerfont.0" set for Win2008 for Czech, and the font fell
> back to the default of "MS Sans Serif-bold-10", which couldn't display some of
> the Czech characters properly.
> 
> Jing, is it possible to set your wizard title font to "Tahoma-bold-10"?

Do you know how to set the title font to Tahoma-bold-10? I really need to fix this.
Comment 19 Jing Yao CLA 2012-06-19 02:17:07 EDT
(In reply to comment #17)
> (In reply to comment #16)
> > Another question, will Win2008 be the supported platform for eclipse 4.2? So
> > the problem should be solved in 4.2, right?
> 
> http://www.eclipse.org/projects/project-plan.php?planurl=http://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_2.xml#target_environments
> 
> Windows 7 and Windows XP are the supported platforms.
> 
> PW

In my understanding, Win7 has no much difference with Win2008. You can not guarantee your application will not run on a server environment. Is there a work around for my current issue?
Comment 20 Jing Yao CLA 2012-06-26 05:31:31 EDT
Hi all,

The defect has been deferred to next release. Is it possible for you to support Win2008 in your next release? I don't think it make sense an eclipse app will only run in client OS. It's also possible to run in an server OS. We are using JFace in our product, this is very important to us. Thanks.
Comment 21 Paul Webster CLA 2012-06-26 06:54:58 EDT
(In reply to comment #20)
> Hi all,
> 
> The defect has been deferred to next release. Is it possible for you to support
> Win2008 in your next release? 

What language pack do you have installed to enable Czech in JFace?  If you are using one from eclipse, what's the filename.  From comment #14, you have to find the .properties file that's supplying org.eclipse.jface.bannerfont.0  and set it to Tahoma-bold-10 for the default properties file for Czech.

PW
Comment 22 Jing Yao CLA 2012-07-03 01:54:05 EDT
Sorry for the late response. We are using the language pack installed by Windows. I think that's what most customers will do.
Comment 23 Paul Webster CLA 2012-07-04 10:42:57 EDT
(In reply to comment #22)
> Sorry for the late response. We are using the language pack installed by
> Windows. I think that's what most customers will do.

I don't know what windows does, but it has no bearing on what eclipse does.  To get menus and labels translated within eclipse, you must install an eclipse language pack (it includes fragments with the appropriate language .properties files).

If you haven't done so already, start with http://www.eclipse.org/babel

PW