Blog About Contact

Getting nice font rendering in Netbeans 7 on Ubuntu 12.04

Published Wed, 21 Aug 2013 • 2 comments

I recently switched to Ubuntu 12.04 for my work PC and I'm pretty happy with the results, except for terrible font rendering in Swing applications, primarily Netbeans.

The fonts looked too light and "wirey". There's a lot of people with the same problem and lot of different opinions on how to fix it. After spending way too long experimenting with all the different suggestions here's the solution I settled on (which looks pretty close to the native font rendering, for the specific fonts I'm using).

  1. Download and use Oracle JDK 7 (not 6) to run IDE. Install in (for example) ~/tools/jdk7

    The reason to not run JDK6 is the way fonts are configured changed between JDK 6 and 7, and JDK7 will pick up Linux fonts natively without further configuration required.

  2. Edit your ~/netbeans_folder/etc/netbeans.conf and set netbeans_jdkhome to the place where you put JDK 7

  3. In the same file add the following options to the netbeans_default_options declaration:

    -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on

  4. Install Android font pack: sudo apt-get install ttf-droid
  5. Start up Netbeans
  6. Install the Java Ayatana plugin if you haven't already to make Netbeans behave with Unity correctly.
  7. Open Tools->Options->Fonts & Colors and set the Default font to "Droid Sans Mono, 15pt"

Now it looks bearable!


About the Author

Richard Nichols is an Australian software engineer with a passion for making things.

Follow him on twitter or subscribe by RSS or email.

You might also enjoy reading -


Discuss / Comment

There are 2 comments.

Add a comment

  • {{e.error}}

Thanks for your comment!/

Required.
Valid email address required.
Required.
Posting message, please wait...