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 格式化码的格式设置
  • 热门搜索
    蛋清可以做什么 毛衣缩水怎么恢复 手机上怎么贷款 凉拌秋葵怎么做 九寨沟旅游 甘肃旅游攻略 凉拌粉丝的做法 6个月宝宝拉肚子怎么办 阳朔旅游 开机密码忘记怎么办