Problem with anti-aliased fonts in Java/Swing applications

Hello, I have a problem with xmonad under Debian with no particular config (no Config.Gnome etc.): in every Swing application, fonts are not anti-aliased, which is ugly. If I add the -Dawt.useSystemAAFontSettings=on option when I start a jvm, fonts are anti-aliased. There is no global property file in Oracle jdk to configure this (notice that the problem is the same for openjdk). I can use the _JAVA_OPTIONS environment variable to set this option, but it adds comments in the console every time I launch a java application, which I do not want. There is no problem with GTK applications. If I start a gnome-session from xmonad, fonts in swing applications are correctly anti-aliased. Is there a way to correct this problem? Sorry if an answer has already been provided, but I did not find any searching the web and Xmonad website. Thanks in advance, Christophe -- Christophe Garion ISAE/DMIA - SUPAERO/IN garion@isae.fr 10 avenue Edouard Belin Tél : (33)5 61 33 80 57 BP 54032 Fax : (33)5 61 33 83 45 31055 Toulouse Cedex 4

Do you have an ~/.Xdefaults file or a ~/.fonts.conf?
You cant try enabling hinting in your ~/.Xdefaults or ~/.Xresources like this:
Xft.hinting: true
Xft.hintstyle: hintfull
Here are the relevant sections of mine:
! Xft settings ---------------------------------------------------------------
Xft.dpi: 96
Xft.lcdfilter: lcddefault
!Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintfull
!Xft.hintstyle: hintslight
On Wed, Jan 19, 2011 at 11:42 AM, Christophe Garion
Hello,
I have a problem with xmonad under Debian with no particular config (no Config.Gnome etc.): in every Swing application, fonts are not anti-aliased, which is ugly.
If I add the -Dawt.useSystemAAFontSettings=on option when I start a jvm, fonts are anti-aliased. There is no global property file in Oracle jdk to configure this (notice that the problem is the same for openjdk). I can use the _JAVA_OPTIONS environment variable to set this option, but it adds comments in the console every time I launch a java application, which I do not want. There is no problem with GTK applications.
If I start a gnome-session from xmonad, fonts in swing applications are correctly anti-aliased.
Is there a way to correct this problem?
Sorry if an answer has already been provided, but I did not find any searching the web and Xmonad website.
Thanks in advance,
Christophe
-- Christophe Garion ISAE/DMIA - SUPAERO/IN garion@isae.fr 10 avenue Edouard Belin Tél : (33)5 61 33 80 57 BP 54032 Fax : (33)5 61 33 83 45 31055 Toulouse Cedex 4
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

On Wed, 19 Jan 2011 16:01:16 -0500, Daniel Anderson

Hello, For those who may be interested, I have looked through the OpenJDK code and the dependency to Gnome (or KDE) for finding X settings is hardcoded. You have to configure gnome for anti-aliasing and start gnome-settings-daemon in order to have anti-aliasing automatically set for Swing applications. I will fill a bug report to OpenJDK, because it seems to me that is not the proper solution. Christophe -- Christophe Garion ISAE/DMIA - SUPAERO/IN garion@isae.fr 10 avenue Edouard Belin Tél : (33)5 61 33 80 57 BP 54032 Fax : (33)5 61 33 83 45 31055 Toulouse Cedex 4

Christophe Garion
For those who may be interested, I have looked through the OpenJDK code and the dependency to Gnome (or KDE) for finding X settings is hardcoded. You have to configure gnome for anti-aliasing and start gnome-settings-daemon in order to have anti-aliasing automatically set for Swing applications.
I will fill a bug report to OpenJDK, because it seems to me that is not the proper solution.
Did you ever get around to posting this bug report? (I ran into the very same behavior today).
participants (3)
-
Christophe Garion
-
Cody Schafer
-
Daniel Anderson