Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
116 lines (79 sloc) 2.87 KB

Better font rendering for java. Particularly for swing applications.

Best if combined with infinality patched freetype:

To show how close it can get to native rendering (font is Consolas):

application screenshot
idea (before)
idea (after)

Intellij Idea 12 before (oracle jdk 1.7):

After (this repo's openjdk and various infinality options):

fontconfig env vars result
default infinality
infinality win7
win7 win7

(etc., there's too many combinations to list them all)


sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix
sudo apt-get update
# For Java 7
sudo apt-get install openjdk-7-jdk
# For Java 8
sudo apt-get install openjdk-8-jdk

Prefer this repository (optional)

By default, security updates are preferred over this repository's packages. This is intentional.

If you are willing to accept the possible security risk, you can always prefer this repository by adding this file.

$ cat /etc/apt/preferences.d/openjdk-fontfix
Package: *
Pin: release o=LP-PPA-no1wantdthisname-openjdk-fontfix
Pin-Priority: 600


sudo apt-get install ppa-purge
sudo ppa-purge ppa:no1wantdthisname/openjdk-fontfix


Run your program with this patched jdk.

E.G. For Intellij Idea, use this script:


# change to your location

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64

# Note: Can modify $IDEA_HOME/bin/idea{,64}.vmoptions
#       instead of setting here.
# "-Dawt.useSystemAAFontSettings=on" seems worse to me
# "-Dsun.java2d.xrender=true" makes fonts darker
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=lcd \

# Having this set makes menu font size smaller (wtf?)
export GNOME_DESKTOP_SESSION_ID=this-is-deprecated

exec $IDEA_HOME/bin/ "$@"


This ppa is built via build-all.

For build dependencies:

sudo apt-get install docker-engine

Also requires some environment variables to be set.

export DEBUSERNAME=John Doe

Optionally a PGP key is required for signing/uploading to a PPA.

OpenJdk 7

Turns on --enable-infinality flag.

OpenJdk 8

Uses patch from tuxjdk.


You can’t perform that action at this time.