netbeans设置Consolas字体乱码的解决办法

 时间:2026-05-04 23:37:42

1、打开netbeans,点击工具 - 选项 - 字体和颜色,字体里选择Consolas字体,确定后会乱码。如图

netbeans设置Consolas字体乱码的解决办法

2、在netbeans安装目录D:\NetBeans 8.1\bin\jre\lib下找到fontconfig.properties.src并复制为fontconfig.properties,用notepad++打开,192行找到sequence.monospaced.GBK=chinese-ms936, alphabetic,dingbats,symbol修改为sequence.monospaced.GBK=alphabetic,chinese-ms936,dingbats,symbol。如图

netbeans设置Consolas字体乱码的解决办法

3、102行monospaced.plain.alphabetic=Courier New修改为monospaced.plain.alphabetic=Consolas。如图

netbeans设置Consolas字体乱码的解决办法

4、109行monospaced.bold.alphabetic=Courier New Bold修改为monospaced.bold.alphabetic=Consolas Bold。如图

netbeans设置Consolas字体乱码的解决办法

5、123行monospaced.bolditalic.alphabetic=Courier New Italic修改为monospaced.bolditalic.alphabetic=Consolas Italic。如图

netbeans设置Consolas字体乱码的解决办法

6、179行monospaced.bolditalic.alphabetic=Courier New Bold Italic修改为monospaced.bolditalic.alphabetic=Consolas Bold Italic。如图

netbeans设置Consolas字体乱码的解决办法

7、然后再在文件最后加入

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

netbeans设置Consolas字体乱码的解决办法

8、最后配置Netbeans

打开Netbeans,选择工具-选项 字体颜色 - 字体

这里注意选择字体时请一定要选择Monospaced,选择其他的字体是没有效果。选择完毕后再看代码页面,一切显示正常了。

  • ubuntu linux中怎样修改文件的“修改时间”
  • 电话号码的正则表达式
  • JDK1.8应该怎么下载
  • 如何把自己git上的代码clone到本地?
  • eclipse 格式化码的格式设置
  • 热门搜索
    潍坊学院怎么样 凉拌苦瓜的做法 百色旅游 宫腔镜检查是怎么做的 粤通卡怎么办理 桂林旅游高等专科学校 买二手房可以贷款吗 常州旅游攻略 哺乳期可以烫染头发吗 湄江风景区