I've been working on some Java stuff lately and instead of using Eclipse as I usually do, I started working with NetBeans 6.1. It works reasonably well (much more than I expected).

However, I run into one really annoying issue: NetBeans looked great on my Ubuntu box; but when I tried running it in my Windows machine, it looked like crap. More specifically, fonts on the text editor surface were rendered without anti-aliasing so they looked horribly wrong.

I remembered then that NetBeans is a Swing app, which, until fairly recently, didn't even support using the platform's built-in sub-pixel rendering technologies (like ClearType on windows). On Java 1.5 (which I was using), however, it should support at least it's own smoothing mechanisms and those were not getting used at all on Windows.

A few searches on google turned up lots of people complaining about it and a few people saying it could be enabled (or would be fixed on Java 1.6) but no clear hints as to where to locate the actual option.


After looking for a while finally figured out: You can enable font smoothing by going to the Tools -> Options dialog, then clicking on the Advanced Options button on the bottom left, and then selecting the Editor Settings category in the new dialog. There you'll find the elusive "Text Antialiasing" option.

I'm not sure why this was enabled by default on Linux but not on Windows, but, anyway, enabling it makes all the difference in the world.

One more thing to keep in mind: The way java renders fonts is a bit weird as well. I'm using DejaVu Sans Mono for the font and I need to use size 20 on NetBeans to get it to look around the same size of the size 15 I use on Vim (both on Windows and Linux).

Technorati tags: , ,

Tomas Restrepo

Software developer located in Colombia.