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.

Comments:

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

Posted by Claudio Miranda on October 02, 2008 at 10:03 AM CEST #

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.

Posted by kiran aghor on October 02, 2008 at 11:45 AM CEST #

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.

Regards,
Petr

Posted by Petr on October 02, 2008 at 12:02 PM CEST #

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.

Posted by OliBlogger on October 03, 2008 at 07:57 AM CEST #

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?

Thanks,
Petr

Posted by Petr on October 03, 2008 at 12:36 PM CEST #

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

Posted by Denis on October 03, 2008 at 04:51 PM CEST #

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

Posted by Petr on October 03, 2008 at 07:03 PM CEST #

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.

Posted by Tor Norbye on October 04, 2008 at 12:03 AM CEST #

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)

Posted by Ilmari Vacklin on October 12, 2008 at 01:09 PM CEST #

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.

Posted by octix on October 17, 2008 at 08:55 PM CEST #

Hi Octix,

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

Thanks,
Petr

Posted by Petr on October 19, 2008 at 03:58 PM CEST #

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

Thanks.

Posted by octix on October 21, 2008 at 10:25 PM CEST #

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.

Thanks,
Petr

Posted by Petr on October 22, 2008 at 08:14 AM CEST #

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.

Posted by octix on October 22, 2008 at 01:56 PM CEST #

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

Resolution:
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>:
netbeans_jdkhome="C:\\Programme\\Java\\jdk1.6.0_14"

Done. After that ClearType rendering should work!

Posted by Thomas on July 07, 2009 at 02:42 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today