United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6742850 : Antialiasing for GTK L&F should be turned on by default if there is no embedded bitmap.

Details
Type:
Enhancement
Submit Date:
2008-08-29
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
open_solaris
Sub-Component:
javax.swing
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
osol_2008.05
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

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
WORK AROUND

Turn antialias on by hand.
===
env _JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=on java ...
java -Dawt.useSystemAAFontSettings=on ...
                                     
2008-08-29
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

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

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



Hardware and Software, Engineered to Work Together