Linux netbeans font anti-sawtooth

Source: Internet
Author: User
Tags netbeans

First of all, I was abused by the jagged netbeans for half a year before I made up my mind to solve this problem.
My Linux release version is ubuntu8.04. If JDK in the source is easy to use (the current version in the source is 1.6u6), JDK 6 starts to support anti-aliasing. After netbeans is installed, you will be pleasantly surprised to find that the text on the GUI (GTK +) is reversed, but the text in the editor is jagged, the font size is very obvious. This problem is well solved. In the advanced options, you can smoothly open the font of the editor. I have endured it for half a year ......
However, wtk cannot be started in the Chinese environment under this JDK. This problem can be solved by specifying the wtk startup appearance as the swing appearance. In fact, not only wtk, but also all javaguiProgramIt cannot be started as a system. This is the first time that a javagui program is generated through the netbeans wizard. When it is run, an error occurs, especially impacting people's confidence and enthusiasm. Although you can set the swing appearance of the application, or adding some inexplicable variable settings in the Program (which can be started as the system looks) can solve the problem, which is still frustrating.
Sun's latest jdk6u10 has finally solved this problem, so we should not use the JDK in the source.
The following describes the manual installation method, which is quite simple. First download the JDK bin package, decompress the package, move the obtained folder to your main folder, and change the name to JDK.
Edit ~ /. Profile, and add

    1. Export java_home =/home/username/JDK
    2. Export Path = $ java_home/bin: $ path
    3. Export classpath =.: $ java_home/lib/tools. Jar

It is worth noting that ,~ /JDK write this way, although it is also the JDK location. You can also get the output by typing Java-version on the console, but the netbeans installer does not know it ......
After logging on again, you can run the netbeans Installer. This time I used netbeans6.5beta. It is very important for me to upgrade proguard to 4.2, so I don't need to manually set it, who asked me to write the program of j2-based. Result-no more advanced options, and the text in the editor is jagged.
There are three solutions to this problem:
One is to use anti-sawtooth only for netbeans, edit/etc/netbeans. conf in the netbeans installation directory, and add this startup Parameter

    1. -J-Dawt.useSystemAAFontSettings = on

The other is to make all Java programs use anti-sawtooth, that is, in ~ /. Add the following content to the profile.

    1. Export _ java_options =
      '-Dawt. usesystemaafontsettings = On'

The last step is to add the editor's "Advanced Settings" and edit it based on the netbeans6.1 settings ~ /. Netbeans/6.5 beta/config/Editors/preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml, add such a section

    1. <
      Entry
       
      Javatype
      =
      "Java. Lang. boolean"
       
      Name
      =
      "Textantialiasing"
       
      XML: Space
      =
      "Preserve"
      >
    2. <
      Value
      >
      True
      </
      Value
      >
    3. </
      Entry
      >

Postscript:

The speed of the Internet transmission is indeed incredible. When I was still searching online for the perfect anti-sawtooth fonts of netbeans, I found that the most I saw was what I wrote.

Although the above method canCodeThe Edit part is anti-sawtooth, but the netbeans menus are all hairy-the Chinese font in Linux is still not doing well, it is a good job to get a from windows. After using it for a while, I still deleted the font out of some kind of emotion.

Ubuntu's Chinese menu from 8.10 To 9.04 has been full of hair, and it's finally ready in 9.10 ...... Although the dot matrix font is a little stingy, it looks beautiful at least. The font of Firefox Web pages is much clearer, and the most uncomfortable Chinese font problem seems to have come to an end.

Return to the anti-sawtooth of netbeans. The actual usage of the parameter AWT. usesystemaafontsettings is like this.

"False" corresponds to disabling font smoothing on the desktop.
"On" corresponds to Gnome best shapes/best contrast (no equivalent Windows desktop setting)
"Gasp" corresponds to Windows "standard" font smoothing (no equivalent GNOME Desktop setting)
"LCD" corresponds to Gnome's "subpixel smoothing" and windows "cleartype"

That is to say, you should actually set it to LCD (there are not many people using CRT now), then you will find that the netbeans font display is still very beautiful, in addition to a few Chinese characters, there is also a little hair, it is necessary to wait for wenquanyi to make the font better to solve.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.