While working on the Infinality article, I've noticed that "slow", who is behind the Infinality PPA for Ubuntu, maintains another PPA for OpenJDK7 which comes with a patch that improves the font rendering for Java / Swing applications in Linux.
Using this patched OpenJDK, the font rendering for Java / Swing applications should look almost native - take a look at these IntelliJ IDEA screenshots (make sure you check out the images in full size - 100% zoom -, or else they will look blurry):
|Before installing the patched OpenJDK|
|After installing the patched OpenJDK|
And another set of screenshots which use a dark background and different font (taken from the PPA description):
Note: since this is for OpenJDK 7, it obviously doesn't have any effect if you use Oracle Java or OpenJDK 6, so make sure your applications use OpenJDK 7 when trying this.
Install OpenJDK7 with font fixes in Ubuntu
Ubuntu 13.10, 13.04 and 12.04 users can install this patched OpenJDK by using slow's PPA. To add the PPA and upgrade to the patched OpenJDK / OpenJRE, use the following commands:
sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix sudo apt-get update sudo apt-get upgrade
Arch Linux users can install this via AUR.
For other Linux distributions, you can get the patch from HERE (altough that might be an older version of the patch - see THIS Infinality forum post for more info).
Revert the changes
To revert the changes and install the unpatched OpenJDK back in Ubuntu, use the following commands:
sudo apt-get install ppa-purge sudo ppa-purge ppa:no1wantdthisname/openjdk-fontfix
once again, thanks to "slow" for the PPA!