JDK-6742850 : Antialiasing for GTK L&F should be turned on by default if there is no embedded bitmap.
  • Type: Enhancement
  • Status: Closed
  • Resolution: Fixed
  • Component: client-libs
  • Sub-Component: javax.swing
  • Priority: P2
  • Affected Version: osol_2008.05
  • OS: open_solaris
  • CPU: generic
  • Submit Date: 2008-08-29
  • Updated Date: 2011-03-07
  • Resolved Date: 2011-03-07
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u12Resolved 7 b64Fixed
Related Reports
Relates :  
Description
If attached sample program is executed on Solaris nevada,
there is no problem about font quality because embeded bitmap font
is used (see HGPGothic.png). HG-PGothicB-Sun has 13 dot embedded bitmap in it.
===
% env LC_ALL=ja_JP.UTF-8 java -jar dist/DesktopApplication1.jar 
Font = javax.swing.plaf.FontUIResource[family=HG-PGothicB-Sun,name=HG-PGothicB-Sun,style=plain,size=13]
===
However, it is executed on Indiana, font quality is not good because
font is rendered by outline without antialiasing on (see ipag.png).
IPA has no 13 dot embedded bitmap in it.
===
% env LC_ALL=ja_JP.UTF-8 java -jar dist/DesktopApplication1.jar 
Font = javax.swing.plaf.FontUIResource[family=IPAPGothic,name=IPAPGothic,style=plain,size=13]
===
So I think that antialiasing should be turned on by default if font glyph is 
rendered by outline (not embedded bitmap) to consider font quality.
I attached SwingSet2 result as SwingSet2_GTK_indiana.png when GTK style look & feel is selected.
Result is same with my sample program. This problem was first found when netbeans was used on indiana. 
Also I found 6418032 which describes exactly same problem we encounted in indiana.
Indiana default Japanese font is IPA. So the situation is the same with Linux destro. From the following evalation,
===
The logic has been updated so on FC5 and other non-Sun desktops AA will be applied.
===
AA seems to be turned on FC5 and other non-Sun desktops. So same setting is also needed on indiana.

Comments
EVALUATION Submitter is very likely correct that its the same issue as 6418032. The GTK code surely identifies Indiana (OpenSolaris) as being Solaris. However the two are far from being identical in the the fonts that are available.
2008-09-02

WORK AROUND Meanwhile we would like to document the workaround in Release Note. Is it proper to specify the following variable in user's profile? _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true" export _JAVA_OPTIONS
2008-09-02

EVALUATION This is not a Java2D/JDK bug. At best its an RFE, including to add a new supported platform which is a larger question, but really its a complaint about the fonts on Indiana. The Java2D default is for AA off. Until such time as we consider changing this this can't be addressed in 2D. Other than CJK fonts embedded bitmaps are rare. But Sun's Swing L&Fs already pick up the desktop settings. However the suggestion here from the workaround is that this is not happening. This could be an incompatible change in Indiana, but I've not heard of similar complaints on other distros, so perhaps its an incorrect end-user desktop setting. Marking bug incomplete to verify that the user desktop font settings are correct and to attach screenshots of one of the tabs from the standard JDK "SwingSet2" demo.
2008-08-29

WORK AROUND Turn antialias on by hand. === env _JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=on java ... java -Dawt.useSystemAAFontSettings=on ...
2008-08-29