JDK-6418032 : GTK L&F in CJK locales disables use of desktop antialiasing.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2006-04-26
  • Updated: 2010-07-29
  • Resolved: 2006-05-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b86Fixed
Related Reports
Relates :  
Description
I'm using Solaris 10 both SPARC and x86, also using Fedora Core 5. I also tried
GTK look&feel on Swing Apps, e.g. NetBeans 5.0 IDE. It seems that Anti-Alias
does not work with these apps when I use GTK L&F and change my font setting of
Solaris JDS and GNOME on Fedora Core 5.

JDK1.5 works fine with swing.aatext=true.

1. Install IPA fonts
	There is free TrueType fonts called IPA fonts, which can be downloaded
	from https://sourceforge.jp/projects/opfc/. Fonts are included in
	module tarball of "ModuleHP". Please contact me if you need fonts.

2. Install these fonts into JDS or GNOME
	copy these font files to ~/.fonts
3. Change Desktop and App fonts to these fonts on setting dialog
	Now you can see these fonts on GNOME apps
4. Try swingset2 with GTK Look&Feel in Japanese locale

Results are,

JDK1.5:
	AA does not work at default option, but -Dswing.aatext=true can
	solve this problem.

	% java -Dswing.aatext=true SwingSet2.jar

	AA now works.

Mustang (b81):
	AA does not work. -Dswing.aatext=true also could not help.

I attached screenshot, it shows JDS menu, JDK1.5 swingset2 with aatext=true,
Mustang b81 swingset2.

Comments
EVALUATION The logic has been updated so on FC5 and other non-Sun desktops AA will be applied.
01-05-2006

WORK AROUND See the question "How can I specify the text antialiasing/font smoothing settings to be used by Swing in applications on Java SE 6?" at http://java.sun.com/products/java-media/2D/reference/faqs/index.html#Q_How_can_I_specify_the_text_ant
27-04-2006

EVALUATION Bug submitter has confirmed this was a CJK locale, so the issue is this GTK L&F specific code in GTKLookAndFeel.java There is actually a bug (RFE in fact) which covers a fairly full fix to this : 6275318 : RFE: use fontconfig to expand GTK logical font definitions Once implemented we would mimic all the important behaviours. Whilst it is duly noted that the submitter observed this on Solaris 10 and on Fedora Core 5, the problem is greater on FC5 since Solaris 10 JDS is a version of the environment for which the current behaviour was intended. So a shorter term fix would be to apply this setting only on Solaris where we are assured of high quality fonts.
27-04-2006

EVALUATION I looked at the image and CJK text is being displayed which I am going to suppose implies a CJK locale. I don't see what this has to do with mustang. The GTK L&F has always (including in 1.5) had code which explicitly disables AA in such locales. The reason for this was that JDS (Sun's Linux/Gnome desktop) had high quality fonts that were expected to be rendered non-AA (ie B&W). The GTK L&F didn't (and doesn't) distinguish whether such fonts are present or configured. That is the apparent bug here. I am not sure if there is a pre-existing bug tracking this but I suspect not.
27-04-2006