北漂IT民工 的博客

UBUNTU/Linux 下Netbeans 6.8的中英文文字美化

netbeans因为安装方便,对html/css/javascript的格式化超级强大,运行速度快一直是我的最爱,


更因为上面的jVi插件非常好用,与项目管理能力非常好让我爱不释手,


但netbeans的字体一直比较难看,所以我们不得不动手自己来配置。


下面是我在Ubuntu下对Netbeans 6.8的字体配置的修改方法。


1)先按下面地址的方法安装好字体。


http://www.3gcnbeta.com/wordpress/2010/01/26/linux%e5%b9%b3%e5%8f%b0debian%e7%b3%bb%e4%b8%8bwindows%e5%ad%97%e4%bd%93%e7%9a%84%e6%b7%bb%e5%8a%a0%ef%bc%88debian-4-0-ubuntu-8-04%e5%8f%8a%e4%bb%a5%e4%b8%8a/


2)然后打开/etc/java-6-sun/fontconfig.properties


sudo vi /etc/java-6-sun/fontconfig.properties


或者(如果你不熟悉vi)


sudo gedit /etc/java-6-sun/fontconfig.properties


3)查找Font File Names,


将前两行替换成如下的任何一种方式


a)宋体


filename.-arphic-ar_pl_shanheisun_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/windows/Fonts/simsun.ttc


filename.-arphic-ar_pl_uming_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/windows/Fonts/simsun.ttc


b)文泉译正黑


filename.-arphic-ar_pl_shanheisun_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc


filename.-arphic-ar_pl_uming_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc


添加后他们看起来象是下面这样子。


# Font File Names


filename.-arphic-ar_pl_shanheisun_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/windows/Fonts/simsun.ttc


#filename.-arphic-ar_pl_shanheisun_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc


filename.-arphic-ar_pl_uming_uni-medium-r-normal–----p--iso10646-1=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc


filename.-baekmuk-batang-medium-r-normal–-%d---c---=/usr/share/fonts/truetype/baekmuk/batang.ttf


filename.-un-batang-medium-r-normal–-%d---c---=/usr/share/fonts/truetype/unfonts/UnBatang.ttf


filename.-un-batang-bold-r-normal–-%d---c---=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf


filename.-baekmuk-gulim-medium-r-normal–-%d---c---=/usr/share/fonts/truetype/baekmuk/gulim.ttf


filename.-un-dotum-medium-r-normal–-%d---c---=/usr/share/fonts/truetype/unfonts/UnDotum.ttf


filename.-un-dotum-bold-r-normal–-%d---c---=/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf


filename.-kochi-gothic-medium-r-normal–-%d---c--jisx0208.1983-0=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf


filename.-sazanami-gothic-medium-r-normal–-%d---c--jisx0208.1983-0=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf


filename.-kochi-mincho-medium-r-normal–-%d---c--jisx0208.1983-0=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf


filename.-sazanami-mincho-medium-r-normal–-%d---c--jisx0208.1983-0=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf


4) 然后跑到最后一行,在下面添加如下的语句:


#Monospaced font configure


filename.-b&h-lucidatypewriter-medium-r-normal-sans--%d---m--iso8859-1=/usr/share/fonts/truetype/windows/Fonts/cour.ttf


filename.-b&h-lucidatypewriter-bold-r-normal-sans--%d---m--iso8859-1=/usr/share/fonts/truetype/windows/Fonts/courbd.ttf


filename.-b&h-lucidatypewriter-medium-i-normal-sans--%d---m--iso8859-1=/usr/share/fonts/truetype/windows/Fonts/couri.ttf


filename.-b&h-lucidatypewriter-bold-i-normal-sans--%d---m-*-iso8859-1=/usr/share/fonts/truetype/windows/Fonts/courbi.ttf