An Oracle blog about NetBeans for PHP

Anti-Aliasing Font in the Editor

NetBeans editor follows the system setting of anti-aliasing font.  On windows you have to set up ClearType method to smooth edges of screen fonts, which is not the default value on Windows XP. I think that Windows Vista uses ClearType method as the default one. Also the default value in both cases can depend on your hardware. To change the method go to the Display Properties and in Appearance tab open the Effects dialog.

When there is the default value Standard, then NetBeans doesn't provide anti-aliasing. The picture below shows the IDE without anti-aliasing or when the method to smooth edges of screen fonts is Standard on Windows XP.

The next picture shows the IDE, when anti-aliasing is switch on.

It's better to see the differences, when the picture is zoomed.

The native anti-aliasing on Windows is available from JDK 1.6 (Update 10). You can disable it, when you start NetBeans with -Dawt.useSystemAAFontSettings=false from command line (netbeans.exe -J-Dawt.useSystemAAFontSettings=false) or you can also add this property to the netbeans.conf file. 

If you use Gnome, then the method of anti-aliasing you can set up in System -> Preferences -> Appearance.

If you don't like the NetBeans default font, you can change it in Option dialog -> Fonts & Colors tab. In the Category list select Default item and change the font. 

For example this is Lucida Console 14.

Join the discussion

Comments ( 15 )
  • Claudio Miranda Thursday, October 2, 2008

    It is possible to force ant VM to switch antialiased on, with -Dswing.aatext=true

  • kiran aghor Thursday, October 2, 2008

    Macs have antialiased fonts by default. So no need to enable. I have been using Tiger since last 3 years and it had cleartype 'ON' by default.

  • Petr Thursday, October 2, 2008

    Hi Claudio,

    this is true, but I don't suggest to use it, because the property -Dswing.aatext=true switch on a pixel anti-aliasing, which is not so nice, as the system one.

    If you still want to use it, you can run netbeans with -J-Dswing.aatext=true from command line or put it to the netbeans.conf file between options.

    Also you can use this property for swith off the anti-aliasing.



  • OliBlogger Friday, October 3, 2008

    Hmm... I work on Windows XP, screen font set to Standard and the font in the NB6.5 editor looks terrible. I tried Cleartype without noticing any difference. NB6.1 is fine.

    Worst of all seems to be the digit 2.

    Without improvement, it would be a showstopper for me to migrate from 6.1 to 6.5.

  • Petr Friday, October 3, 2008

    Hi OliBlogger,

    could you send me a screenshot? It must be in png or other bitmap format (not jpg). What other application, do they have anti-aliasing?

    Could you try to start NB with the already mentioned property -J-Dswing.aatext=true and also could you try property -Dawt.useSystemAAFontSettings=true and combination -J-Dswing.aatext=false -Dawt.useSystemAAFontSettings=true? What JDK do you use?



  • Denis Friday, October 3, 2008

    Good thing that Java 6 update 10 uses native font rendering on Windows so it looks better.

  • Petr Friday, October 3, 2008

    Yes, this is the reason, why I'm asking to OliBlogger, which JDK he uses.

  • Tor Norbye Friday, October 3, 2008

    Native Windows font rendering is brand new in update 10, so if you're using anything older, it won't look good on Windows. For Linux, font antialiasing was fixed in JDK 6 (any version). For Mac, it's been there since at least 1.4.

  • Ilmari Vacklin Sunday, October 12, 2008

    On my Linux box (Ubuntu 8.04), I can't get NetBeans to render with native fonts. What JDK versions is the native font rendering supposed to work on?

    wolverian@chronoa:~$ java -version

    java version "1.6.0_06"

    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)

    Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)

  • octix Friday, October 17, 2008

    Hi. I have same problems as OliBlogger.

    NB6.1 looks better then 6.5b with the same font, monospaced 12

    I just updated my JDK, just in case.

    java version "1.6.0_10"

    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)

    Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)

    Where can I send screenshots?

    By the way, I have tried this combination also:

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

    but it disables AA, it looks like 2nd argument is not honored.

    PS: XP SP2 and yes ClearType is enabled.

    PPS: I really wait for a fix for this.

  • Petr Sunday, October 19, 2008

    Hi Octix,

    send the screenshot to me petr.pisl@sun.com.



  • octix Tuesday, October 21, 2008

    I have sent them couple of days ago, did you get them?


  • Petr Wednesday, October 22, 2008

    Hi Octix,

    I'm sorry for the late response, too much work.

    I have discussed the issue with our editor guys and they pointed me out one issue http://www.netbeans.org/issues/show_bug.cgi?id=137845 , which is not fixed in beta, but should be fixed in RC1. Could you try it? And don't use property -J-Dswing.aatext neither -Dawt.useSystemAAFontSettings, just the default state. Also could you try it with clean userdir (http://blogs.sun.com/netbeansphp/entry/userdir)?

    Let me know if there is a change.



  • octix Wednesday, October 22, 2008

    Hi Petr.

    No problem, just wanted to make sure you got them.

    So, I have installed RC1 on another PC, and it looks much better, i suppose as it should :) I did not check for userdir, because there wasn't any NB installed before. Anyway I'm more than happy :) It was the only issue that was stopping me to use NB more intensively.

    Thanks a lot.

  • Thomas Tuesday, July 7, 2009


    ClearType font rendering not working in Netbeans 6.7 on Windows XP.


    1) Install latest Java SDK (jdk1.6.0_14)

    2) Change line 19 in "C:\\Programme\\NetBeans 6.7\\etc\\netbeans.conf" to :

    # Default location of JDK, can be overridden by using --jdkhome <dir>:


    Done. After that ClearType rendering should work!

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.