Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to fix font of IntelliJ

📅 2015-Oct-21 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ android studio, font, intellij, openjdk ⬩ 📚 Archive

[caption id="attachment_7735" align="aligncenter" width="660"][Before and after fixing font in Android Studio](https://codeyarns.files.wordpress.com/2015/10/20151021_intellij_font.png) Before and after fixing font in Android Studio[/caption]

Problem

IntelliJ and other tools based on it, like Android Studio, look terrible on Ubuntu 14.04 with OpenJDK 7. The font rendering in the UI is terribly aliased and is a pain on the eyes. This is surprising since Eclipse renders beautifully using the same JDK and Ubuntu system.

Solution

Eclipse uses GTK for its GUI while IntelliJ and Android Studio use Swing. Thankfully, this situation can be fixed.

$ sudo apt-get purge openjdk-7-jdk
$ sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix
$ sudo apt-get update
$ sudo apt install openjdk-7-jdk

Now IntelliJ or Android Studio should render the font much better. I still notice a bit of aliasing with Consolas, but it is manageable.

Tried with: Android Studio 1.4 and Ubuntu 14.04