NetBeans使用Consolas中文亂碼的解決

1.進入jdk安裝目錄下/jre/lib文件夾,找到fontconfig.properties.src,拷貝爲 fontconfig.properties ,修改此文件。工具

找到:字體

sequence.monospaced.GBK=chinese-ms936,alphabetic,dingbats,symbol,chinese-ms936-extb
monospaced.plain.alphabetic=Courier New
monospaced.bold.alphabetic=Courier New Bold
monospaced.bolditalic.alphabetic=Courier New Italic
monospaced.bolditalic.alphabetic=Courier New Bold Italic

修改成:spa

sequence.monospaced.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
monospaced.plain.alphabetic=Consolas
monospaced.bold.alphabetic=Consolas Bold
monospaced.bolditalic.alphabetic=Consolas Italic
monospaced.bolditalic.alphabetic=Consolas Bold Italic

在文件末尾添加Consola字體定義:code

filename.Consolas=CONSOLA.TTF
filename.Consolas_Bold=CONSOLAB.TTF
filename.Consolas_Italic=CONSOLAI.TTF
filename.Consolas_Bold_Italic=CONSOLAZ.TTF

2.blog

在Netbeans中進行配置
Netbeans->工具->選項->字體和顏色 字體設置爲 Monospaced 。it

設置成功。其餘字體的設置將Consola設爲其餘字體便可。class

相關文章
相關標籤/搜索