Reproduced Netbeans7.0 Perfect Chinese +consolas font display configuration notes

Source: Internet
Author: User
Tags netbeans

Recently migrated the development environment from Eclipse to NetBeans. Because NetBeans is pretty good, fast and doesn't have to eclipse, but one problem has always made me very tangled with eclipse: if you choose Font as Consolas, All the Chinese in the Code edit box will be garbled, very uncomfortable. A little study of the problem today and summed up the perfect solution, is now shared

1. Modify the font configuration file for the JRE
Netbean uses swing development, and Swing's font selection rules are configured according to the JRE font, which is in the JRE directory
First, modify the Chinese configuration rules
We go to the/jre/lib folder in your JDK directory, copy the Fontconfig.properties.src file as fontconfig.properties and open it with a text editor
Found it
sequence.monospaced.gbk=chinese-ms936, Alphabetic,dingbats,symbol
Revision changed to
Sequence.monospaced.gbk=alphabetic,chinese-ms936,dingbats,symbol
Note that the GBK here represents the Chinese font encoding, if you are traditional Chinese, then you need to modify sequence.monospaced.x-windows-950 this project
Then modify the default equal-width font, search for the following 4 configuration items
Monospaced.plain.alphabetic=courier New
Monospaced.bold.alphabetic=courier New Bold
Monospaced.bolditalic.alphabetic=courier New Italic
Monospaced.bolditalic.alphabetic=courier New Bold Italic
Revision changed to
Monospaced.plain.alphabetic=consolas
Monospaced.bold.alphabetic=consolas Bold
Monospaced.bolditalic.alphabetic=consolas Italic
Monospaced.bolditalic.alphabetic=consolas Bold Italic
Then add the definition of the Consolas font at the end of the file
FileName. Consolas=consola. TTF
FileName. Consolas_bold=consolab. TTF
FileName. Consolas_italic=consolai. TTF
FileName. Consolas_bold_italic=consolaz. TTF
Note Here I use Consolas, if you want to use the other font, please modify it yourself
2. Configure NetBeans
Open NetBeans, select Tools-Options Font Color-font

Note that when choosing a font, be sure to select monospaced, and choose a different font is not effective
After the selection is finished, look at the code page, everything appears normal.

I modified the font today according to this article, fully OK

Reproduced Netbeans7.0 Perfect Chinese +consolas font display configuration notes

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.