Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

See the attached image. The window in the background is gedit with the fonts rendered smooth. The window on top is NetBeans with not-so-smooth font rendering (not anti-aliased, I think). Both editors use Ubuintu Mono font. Can anyone help me to make NetBeans render the fonts better?

I'm on 12.10.

share|improve this question
up vote 14 down vote accepted

You should be able to improve the font rendering, but it will never be like the one in Gedit. Usually all java applications using Swing have that weird rendering. If you use Eclipse, for example, the font rendering should be correct.

Font rendering can be changed in /etc/netbeans.conf:

sudo gedit /etc/netbeans.conf

and at the end of netbeans_default_options (between the quotation marks) add this:

-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=<OPTION>

where option can be "on", "gasp" or "lcd". You can get the full list here.

Try all those and see which one gives you best look. Hope it helps.


i don't have Netbeans installed right now to test, but depending on the way you have installed it netbeans.conf can be located somewhere else.

share|improve this answer
Thanks. I found it a while ago myself. – Sparky Dec 22 '12 at 12:35
The on option worked just fine for me. Thank you. – Kolyunya Sep 15 '15 at 9:33


See this and this.

TL;DR: just add -J-Dawt.useSystemAAFontSettings=on -J-Dswing.aatext=true to netbeans_default_options in the netbeans.conf file.

(netbeans.conf is at <installdir>/etc/netbeans.conf)

Of course, restart NetBeans.

See the result screenshot below. The Netbeans window on the extreme right is the onc after the above options are applied. Still not as good as gedit, but better than before.

enter image description here

share|improve this answer
The . and : are still only one pixel. No solution for this? – NoBugs Mar 29 '14 at 5:56

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.