Bug 539971 - Font AA is disabled by defaul (GTK Apps look ugly)
Summary: Font AA is disabled by defaul (GTK Apps look ugly)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: man lung wong
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 539293 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-21 19:38 UTC by drago01
Modified: 2010-05-18 17:55 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-18 17:55:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description drago01 2009-11-21 19:38:06 UTC
Description of problem:

After updating to F12, Java apps that do not use SWT but SWING/AWT have no font AA which looks very bad.

When setting 

_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'

The apps look as expected (examples are netbeans, or apps that we don't ship like geogebra).

Please (re)enable this by default.

Version-Release number of selected component (if applicable):
java-1.6.0-openjdk-1.6.0.0-33.b16.fc12.x86_64

How reproducible:

Always

Steps to Reproduce:
1. start a swing/awt using app with the GTK theme
2. notice ugly fonts
3. do the same with _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on', fonts look as expected.
  
Actual results:

Aliased fonts

Expected results:

Anti aliased fonts

Comment 1 David 2009-11-23 23:47:42 UTC
I just added an alias to my .bashrc with java -Dawt.useSystemAAFontSettings=on

Comment 2 Rob Whalley 2009-12-16 11:36:32 UTC
David, thanks for the above method, however I found that it only works from a terminal window, so I did a bit of research and this is what I found:

1. Found similar bug on Sun website:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6418032

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

3. This suggests using: 
java -Dawt.useSystemAAFontSettings=lcd

4. Also confirmed that adding following to $HOME/.bashrc works, but again, only from a terminal window:
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd'

5. Checked following page for how to add this as a Netbeans startup parameter (uses -J apparently):
http://wiki.netbeans.org/FaqStartupParameters

6. Checked following page for how to add this to the netbeans.conf startup file:
http://wiki.netbeans.org/FaqNetbeansConf

7. Found netbeans.conf:
locate netbeans.conf
/usr/share/netbeans/6.7.1/etc/netbeans.conf


To startup netbeans from terminal / shortcut you can do:
netbeans -J-Dawt.useSystemAAFontSettings=lcd
...or netbeans -J-Dawt.useSystemAAFontSettings=on of course ;)

To add this option to netbeans.conf, find the line:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"

...and simply add the startup parameter to the end of the line (within the existing quotations), e.g.

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dawt.useSystemAAFontSettings=lcd"


As an alternative, the following seems to work to add the startup parameter for all java applications, but I'm not sure if it's a good idea or not (someone with more knowledge please comment):

su -c "echo export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd' > /etc/profile.d/java-font-smoothing.sh"

This creates a script in the /etc/profile.d/ folder that should run on next login.


What comments do people have as regards how this could be implemented in future builds? Is there a better approach to ensuring the java fonts are rendered than the methods already discussed?

Comment 3 David 2009-12-16 11:58:40 UTC
Hi Rob many thanks for replying. I too after some investigation found that you can add various settings to netbeans to solve the issue.

The alias seems to work well at this stage for me as a lot of the applications i use are launched from the cli, even those from the menu.

But we need to find a way of doing this as I would rather not have to add this option to some of the startup scripts I use for my applications based on the nebeans platform.

I would have thought a system variable would work quite well.

Comment 4 Leif Gruenwoldt 2010-01-24 05:37:04 UTC
Possible duplicate of Bug 539293

Comment 5 drago01 2010-02-04 09:05:11 UTC
This seems to be fixed in java-1.6.0-openjdk-1.6.0.0-34.b17.fc12.x86_64

Comment 6 Fedora Update System 2010-03-13 17:51:38 UTC
java-1.6.0-openjdk-1.6.0.0-33.b17.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-33.b17.fc11

Comment 7 Fedora Update System 2010-03-13 17:53:51 UTC
java-1.6.0-openjdk-1.6.0.0-36.b17.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-36.b17.fc12

Comment 8 Fedora Update System 2010-03-15 09:29:21 UTC
java-1.6.0-openjdk-1.6.0.0-35.b17.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-35.b17.fc13

Comment 9 Fedora Update System 2010-03-16 00:41:02 UTC
java-1.6.0-openjdk-1.6.0.0-33.b17.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2010-03-16 00:45:08 UTC
java-1.6.0-openjdk-1.6.0.0-36.b17.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-03-23 23:27:46 UTC
java-1.6.0-openjdk-1.6.0.0-35.b17.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Lubomir Rintel 2010-04-05 10:35:11 UTC
*** Bug 539293 has been marked as a duplicate of this bug. ***

Comment 13 Deepak Bhole 2010-05-14 16:07:19 UTC
Re-assigning to dev side to look into it.

Comment 14 man lung wong 2010-05-18 17:55:11 UTC
Like the reported said on comment 5, this bug is fixed. It was reverified on 

Fedora 11 i386 + x86_64
Fedora 12 i386 + x86_64
Fedora 13 i386 + x86_64

All results were similar

netbeans  - GUI shown with AA fonts (= AA enabled by default)
netbeans -J-Dawt.useSystemAAFontSettings=off   - GUI without AA fonts
netbeans -J-Dawt.useSystemAAFontSettings=on    - AA fonts
netbeans -J-Dawt.useSystemAAFontSettings=lcd   - AA fonts (little
different from previous one, maybe due to subpixel rendering)

Thanks,
Man Lung Wong


Note You need to log in before you can comment on or make changes to this bug.