This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 166288 - Font of menu and other component is not so good
Summary: Font of menu and other component is not so good
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2009-05-30 12:32 UTC by xym777
Modified: 2009-07-24 12:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of netbeans (154.54 KB, image/png)
2009-05-30 12:35 UTC, xym777
Details
netbeans with --jdkhome set to jdk from sun (428.91 KB, image/png)
2009-06-03 16:42 UTC, xym777
Details
SwingSet2 with --jskhome set to jdk from sun (449.15 KB, image/png)
2009-06-03 16:45 UTC, xym777
Details
screenshot on my Ubuntu box (385.43 KB, image/png)
2009-06-04 04:02 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xym777 2009-05-30 12:32:33 UTC
My OS is Ubuntu 9.04 on VirtualBox.
NetBeans version are 6.5 and 5.5.1. Both ot them got the same issue.
Chinese charactors in menu and other components, e.g. ListBox, CompBox, etc. are displayed too "slim" and "colorful".
These Chinese charactors are supposed display in black, squire and same-size as non-Chinese charactors.
I am sure they are not controlled by Ubuntu system, and not controlled by JDK's fontconfig.properties.
I need to know where to modify netbeans' menu font setting.
I got a screenshot of this issue but I can not submit this screenshot together with this issue.
Comment 1 xym777 2009-05-30 12:35:04 UTC
Created attachment 83014 [details]
screenshot of netbeans
Comment 2 Masaki Katakai 2009-06-03 06:52:32 UTC
Thank you for filing issues, I have 2 simple questions :

- Which JDK are you using?
- Are you seeing this on NetBeans 6.7 RC1?
  (Chinese localization bundled)

I understand GTK L&F is being used on Ubuntu GNOME desktop so
GNOME setting will be used in such menu and most UI parts.
But it looks strange.

Rebecca, is it possible to try this?
Comment 3 xym777 2009-06-03 07:29:00 UTC
JDK: openjdk-6-jdk for i386
Comment 4 Rebecca Liu 2009-06-03 08:14:49 UTC
xym777

Could you try to use SUN jdk6 instead of OpenJDK? As I know, OpenJDK may cause some unexpected issues.
Comment 5 xym777 2009-06-03 08:56:07 UTC
There is no difference in NetBeans 6.7 RC1
Comment 6 xym777 2009-06-03 10:15:02 UTC
JDK is changed to Sun's. All the same. No difference.
I don't thing it's JDK that causes this issue. 
Please refer to the attached screenshot submitted on 30 May 2009. Please pay attention to the area with a note in 
blue. Chinese charactors in this area is controlled by JDK and they are displayed properly.
Comment 7 Masaki Katakai 2009-06-03 10:34:56 UTC
Thank you for checking.

Did you succeed to switch JDK? We can use --jdkhome option, e.g.

% netbeans --jdkhome <SUN JDK HOME>

> blue. Chinese charactors in this area is controlled by JDK and they are displayed properly.

Yes, true. But other areas e.g. menus and buttons are also rendered by JDK through GTK L&F.

Please try a JDK demo.

% cd <JDK_HOME>/demo/jfc/SwingSet2
% <JDK_HOME>/bin/java -jar SwingSet2.jar

What will happen when you switch the Look&Feel from Java to GTK from menu?
Could you please attach some screenshots?

If only Java L&F is working, please try Java L&F for NetBeans.

% netbeans --jdkhome <JDK HOME> --laf Metal

Comment 8 xym777 2009-06-03 16:42:09 UTC
Created attachment 83168 [details]
netbeans with --jdkhome set to jdk from sun
Comment 9 xym777 2009-06-03 16:45:19 UTC
Created attachment 83169 [details]
SwingSet2 with --jskhome set to jdk from sun
Comment 10 xym777 2009-06-03 16:46:38 UTC
Please refer to screenshots nb6.7_jdkhome.png and SwingSet2.png.
Comment 11 Masaki Katakai 2009-06-04 04:01:36 UTC
Thank you for taking screenshots.

Please try to configure JDK fonts. Showing square box is well-known issue
of JDK. You can find the workaround in many places.

I just tried on my Ubuntu. I'm using in Japanese usually so I added just
Chinese language support. The easiest workaround to provide a link

jre/lib/fonts/fallback

from chinese font directory. For example,

ln -s /usr/share/fonts/truetype/arphic /usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/fonts/fallback

I don't know arphic is good for chinese or not, but it works.
Comment 12 Masaki Katakai 2009-06-04 04:02:45 UTC
Created attachment 83184 [details]
screenshot on my Ubuntu box
Comment 13 Rebecca Liu 2009-06-04 07:10:12 UTC
My Ubuntu also works fine. 

As Masaki said, "square" is a known issue for NetBeans on Linux platform. You can see the details in release notes:
http://www.netbeans.org/community/releases/67/relnotes.html#known_issues-core
Comment 14 xym777 2009-06-04 10:20:57 UTC
It's true that "square" is a well-known issue and it got well-known solutions but it is caused by --jdkhome set to jdk 
without proper i18n setting. 
It is not the original issue.
What I would like to know is what can affect GTK's appearence.
In the original issue, it's obviously that GTK can find Chinese font set but can not display them properly.
Thanks for your effort.
Comment 15 Rebecca Liu 2009-06-05 01:32:57 UTC
I don't understand now. Do you still see the original issue after you switched the JDK? If not, then the problem is
solved, right? 

We don't know what results in that bad look&feel. We can only provide you a solution, that is, using SUN JDK and
configuring its fonts. If you really want to investigate the reason, I suggest you go to the OpenJDK project and raise
this issue there.  
Comment 16 Antonin Nebuzelsky 2009-07-24 12:47:28 UTC
Closing as worksforme based on the last comments.