8

I am using Oracle Java 8 and Android Studio, but it is difficult to work with it because of the ugly font rendering. Here are some screen-shots.

code in Android Studio

more code in Android Studio

I am using Ubuntu 16.04 LTS 64-bit. Android Studio is set to use the GTK Themes. I have also added the following options to andriod-studio/bin/studio64.vmoptions and android-studio/bin/studio64.vmoptions as described in this post on Super User.

-Dawt.useSystemAAFontSettings=on
-Dswing.aatext=true
-Dsun.java2d.xrender=true

Apart from the GTK theme settings in Android-Studio > Settings > Appearance, nothing else is done.

I am also not really happy with the overall fonts settings on my machine. Here is a screenshot of firefox:

reddit posts

I have only installed some powerline fonts in my ~/.fonts directory for my rxvt terminal. That's all.

Any pointers on how to go from here?

3 Answers 3

4

In the bundled JRE, there's a font configuration file which seems to default to full hinting.

To change this, open jre/lib/fonts/font.conf and locate the following part:

<edit mode="assign" name="hintstyle">
  <const>hintfull</const>
</edit>

There, replace hintfull with a different hintstyle, e.g. hintslight which is usually the default for other UIs in Ubuntu.

4

IntelliJ and Android Studio have long had issues with font rendering. However a setting for this was added in Android Studio 2.0. It might help

Appearance and Behaviour > Appearance > Antialiasing

settings dialog window

2
  • I tried that too but didn't work out the way it should. I am now using a mac, and thinks work out if the box there.
    – neo1691
    May 28, 2016 at 10:16
  • I've this problem with Android Studio but not with IntelliJ. The settings are the same... go figure. Aug 23, 2017 at 10:29
1

Quick fix for me: delete the jre directory in your AndroidStudio directory. It will now use your java set with JAVA_HOME. Make sure you have one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .