http://anadoxin.org/blog

Fixing ugly Java fonts

Mon, 08 September 2014 :: #linux :: #java

Today I got an e-mail from Jetbrains about the release of their new Integrated Development Environment called CLion ("SeaLion"). Being a curious creature I decided to check it out by using the Early Access Program which is open to public. After running the IDE, my biggest problem was the font rendering, which can be seen on this screenshot (click to see the full size):

Hinting off

Swing and Java are nice in theory, but in practice they're often not so nice. CLion is not an exception. Fortunately, some shortcomings can be fixed pretty easily.

To fix the font issue, just force Java's awt.useSystemAAFontSettings setting to on. You can do this in many different ways, but I decided to use $_JAVA_OPTIONS variable in my shell's startup script, .zshrc. For bash, the method is almost identical, you just have to put your settings inside .bashrc (but you already knew that).

export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"

After this modification, CLion started to look more friendly:

Hinting on

Still not as good as in my Vim in the terminal window, but close enough!

The IDE itself is also quite nice. Slow speed can be irritating, but it's bearable, provided the product is good.