Today I noticed fonts in my Swing-based Java apps were utterly hideous. They were no longer being rendered with anti-aliasing. I don't know if this is because today I logged into a minimal Openbox+fbpabel setup and GNOME was handling this automatically or if it's caused by some other subtle thingy.
No matter, it's pretty easy to fix. Add
to your ~/.profile file. You'll probably then have to logout and back in. After this anti-alised rendering will be the default.
Supposedly, you can do this system-wide by adding
to your /etc/environment file, but I have not tried this.
Update There is one downside to this: the JVM will write Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on to the console. It's not a deal-breaker, but it is a little annoying.