Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use a higher DPI setting which makes IntelliJ (actually Android Studio) have really messed up fonts.

I use MacType which renders my fonts beautifully elsewhere, but I guess Java VM somehow intercepts it or something, it's killing me.

share|improve this question

4 Answers 4

up vote 49 down vote accepted

I’m on a high-dpi display and I got it working with a perfect font rendering, to achieve this you need to:

  • (On Linux) Install and use Oracle JDK (I’m using 1.7) and not OpenJDK (also the patched one with fontfix was useless for me). See how to do this.

  • Edit the .vmoptions configuration file that you find into the Bin installation folder (eg. studio.vmoptions and for 64bit studio64.vmoptions, or WebStorm.exe.vmoptions etc. according to the version of the IDE you installed) by adding these lines:

  • Remove hinting informations from the font that you would like to use and select the new font into IntelliJ IDEA preferences (Setting -> Editor -> Font);
    if you don’t know how to do this, install FontForge then:

    1. Open your font in FontForge
    2. Select all glyphs via Ctrl+A and clear all hints (Hints -> Clear Hints)
    3. Select glyphs again and use Hints -> Clear Instruction
    4. Save the font with different name ( File -> Generate Fonts)
    5. Install the new font, select it in IDEA

If you followed the above tips and you’re experiencing lags when fast scrolling the code (this sometimes could happen on Linux distributions with a not optimized gpu driver), try removing the line
from the .vmoptions file.

Finally, here is a screenshot of the result:

IDE screenshot

(fonts used here are LucidaMAC for the main IDE and Ubuntu Mono with removed hinting informations for the code editor)

share|improve this answer
Awesome! Works in Windows as well :)) thank you :* –  Bloke Jul 25 '13 at 10:06
@Pace To remove blurry fonts you need to disable display scaling for that application (right click on its icon, select Properties, go to Compatibility tab and check Disable DPI scaling on high DPI settings, for x64 apps in Win8- you should edit the flag of the related registry key: open Regedit.exe, go to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers and add a string value REG_SZ whose name is the full path to the application executable and whose value is HIGHDPIAWARE) ;) –  guari Jan 7 '14 at 14:22
@guari - Kudos to you sir! Thank you so much. I start a Coursera Android course this week and now I have perfectly rendered smooth fonts! I just upped the general font settings for the IDE and the editor to set them to 26pt and I can't believe how good it looks! Thanks again. –  Pace Jan 10 '14 at 0:05
cant clear hints and instructions on fonts in font forge... There are errors when i try to save them after that... What am i doing wrong –  Mario Zderic Sep 12 '14 at 10:05
Wow. Still helpful a year later. JetBrains needs to make this the default or at least perform some auto detection. The blurriness without these settings makes IntelliJ look awful and unusable. –  Andrew Finnell Sep 19 '14 at 13:18

If you can't clear hints with FontForge like guari explained in his answer. Use Cousine (Apache License v2.00) as editor font and set the size to 14. I tried a couple of other monospaced fonts. However, Cousine seems to have a nicer rendering than the most other fonts. See the screenshot at the end

  1. Download the font: cd ~/Downloads/ && wget www.fontsquirrel.com/fonts/download/cousine
  2. Create a new font family dir: sudo mkdir /usr/share/fonts/truetype/Cousine
  3. Extract the font files: sudo unzip cousine -d /usr/share/fonts/truetype/Cousine/
  4. Make them available for IntelliJ: sudo chmod -R 777 /usr/share/fonts/truetype/Cousine
  5. Update the font cache: sudo fc-cache -f -v
  6. Restart IntelliJ and choose Cousin as editor font
  7. Don't forget to set the vmoptions like guari explained

share|improve this answer

The accepted answer didn't work for me but I got everything working by doing this:

After reading various tutorials and messing with a bunch of fixes I've found a way that works perfectly.

First of all download JDK 8 from Oracle and execute the following lines in the terminal:

cd Downloads
tar -xvf jdk-8u25-linux-x64.tar.gz
rm jdk-8u25-linux-x64.tar.gz
sudo mkdir -p /usr/lib/jvm/
sudo mv jdk1.8.0_25 /usr/lib/jvm/

Now download the JDK font fix (Courtesy of [Urshulyak Yaroslav][2]) by executing the following:

cd ~/Downloads
wget http://urshulyak.com/jdk-8u5-tuxjdk-b08.tar.gz
tar -xvf jdk-8u5-tuxjdk-b08.tar.gz
sudo mv jdk-8u5-tuxjdk-b08 /usr/lib/jvm
rm jdk-8u5-tuxjdk-b08.tar.gz

This will extract the downloaded zip and move it to /usr/lib/jvm/. Now run the following in the terminal:

cd ~
sudo gedit .bashrc

Then add the following lines to the very bottom of the bashrc file.

export JAVA_HOME

Save it then gedit the idea.sh. (Your script location may be different)

gedit /home/USER/Downloads/idea/bin/idea.sh

At the very bottom of the script replace the line(s) in the While Do statement at the bottom with these two lines:

eval "/usr/lib/jvm/jdk-8u5-tuxjdk-b08/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"
test $? -ne 88 && break

Save it then open up IntelliJ, the fonts should work and you will be using Oracle JDK 8 for development. You will likely have to edit Project Settings and set up your JDK again but be sure to use the actual JDK and not the font fix one.

This fix also works with CLion, Android Studio and [PyCharm.

These instructions assume the JDK version was 1.8.0_25, file/path names will change for future versions.

share|improve this answer

I wrote a little manual howto fix this.

   wget http://urshulyak.com/jdk-8u5-tuxjdk-b08.tar.gz
   tar -zxvf jdk-8u5-tuxjdk-b08.tar.gz
   sudo mv jdk-8u5-tuxjdk-b08 /usr/lib/jvm
   rm jdk-8u5-tuxjdk-b08.tar.gz

Script to start Intellij Idea

*only note that need to change IDEA_HOME location for your path of idea


export JAVA_HOME=/usr/lib/jvm/jdk-8u5-tuxjdk-b08/
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=lcd \
export GNOME_DESKTOP_SESSION_ID=this-is-deprecated
exec $IDEA_HOME/bin/idea.sh "$@"

More info and screenshots of better fonts: http://urshulyak.com/?p=478

share|improve this answer
Adding -Dsun.java2d.xrender=true to bin/webstorm64.vmoptions in WebStorm's directory was enough for me. –  ntrrgc Dec 21 '14 at 23:20
the download link is broken. Please fix –  jackode Jan 3 at 15:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.