Subpixel Antialiasing Fontrendering in Editor
I've played with the new subpixel antialiasing in editor. It was introduced with build 39 of JDK 6. There's not an option to activate it NetBeans yet. Somebody asked how to hack the NetBeans sources to try it, so for editor you have to do is to change
this file and put a new hint into the Map, replacing the old hint:
private static final Map textAntialiasingHintsMap = new HashMap();
static {
textAntialiasingHintsMap.put(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
}
The VALUE_TEXT_ANTIALIAS_LCD_HRGB hint activates subpixel rendering. Then you need to recompile editor module with the
very latest build of JDK (39). Once recompiled, replace the original editor module in ide5/modules.
You will probably ask when will we add this option to NetBeans - it will take some time, because we want also to detect OS settings of antialiasing to make the configuration easy (both under Windows and Linux which is not trivial). I'll blog about it when the option is there.
It's important to note that the best quality is achieved with a DVI connector - if your LCD is connected with an analog connector, the rendering may look slightly worse than with DVI. Here are the screenshots, the last one is with Subpixel Antialiasing activated in editor:

No AA in editor No AA in menus
|

Normal AA in editor Normal AA in menus
|

Subpixel rendering in editor Normal AA in menus
|
You can also take a look at relevant thread at
Javalobby.
Update: You can try to the subpixel AA in NetBeans yourself by downloading the daily build 200506072010 and replacing editor in ide5/modules by
this jar (it's a good idea to keep a backup of the original file). Delete your userdir before launching the IDE. The AA setting in Editor (Tools | Options | Editing | Editor Settings | Text Antialiasing) activates the subpixel one instead of the regular. You need to use the latest JDK build to see it, otherwise be prepared for exceptions ;-)
Posted by Torgeir Veimo on červen 08, 2005 at 08:09 odp. CEST #
Posted by Wincent on červen 08, 2005 at 08:12 odp. CEST #
Why do you need 4.1 daily builds anyway? Everybody's working on 4.2 now.
Posted by Roman Strobl on červen 08, 2005 at 08:12 odp. CEST #
Posted by Roman Strobl on červen 08, 2005 at 08:15 odp. CEST #
Posted by Dmitri Trembovetski on červen 08, 2005 at 09:28 odp. CEST #
Posted by Wincent on červen 09, 2005 at 12:30 dop. CEST #
Posted by aaa on červen 09, 2005 at 07:04 dop. CEST #
Posted by Roman Strobl on červen 09, 2005 at 09:34 dop. CEST #
Posted by Roman Strobl on červen 09, 2005 at 09:34 dop. CEST #
Posted by Ale500 on říjen 22, 2005 at 12:18 dop. CEST #
To obtain subpixel hinting antialiasing in netbeans, using JDK 1.6 add the following text to the netbeans_default_options line:
-J-Dawt.useSystemAAFontSettings=lcd
It looks even better than using -J-Dswing.aatext=true
Posted by Awef on březen 02, 2008 at 04:37 odp. CET #
Thanks for all!! Editing netbeans.conf file, it works! :)
Posted by ale500 on březen 03, 2008 at 07:49 dop. CET #