sublime text 3在win10下中文显示为方块的解决方
2017-04-21 本文已影响303人
闲睡猫
sublime text 是一款令人既爱又恨的编辑器,虽然插件功能极其丰富,可由于是闭源的,其作者经常玩失踪,软件出现bug很难处理。这两天又踩到一个坑了,在win10安装后,发现所有中文都变成方块了...


原因,这是sublime text的显示bug,在高分屏下设定显示放大就会触发。作者又迟迟不修复,只能自己处理了,解决方案如下:
让中文显示正常
Perferences-->Settings
在Preferences.sublime-settings文件中将dpi_scale设置为1.0
"dpi_scale": 1.0
重启sublime text,中文的显示是正常了。但是,所有字体都变小了, 变得很小,很小...
解决一个问题是以产生另一个问题为代价的。没办法,继续填坑吧
修改内容字体大小
跟第一步一样,还是在Preferences.sublime-settings文件中修改配置项:
具体的大小因人而异
"font_size": 15,
修改侧边栏字体大小
这个要分几步走
-
安装PackageResourceViewer插件
-
在sublime-settings文件中查看自己使用的主题
我使用的是 "theme": "Afterglow-green.sublime-theme",
如果你使用的是默认的主题,就是 "theme": "Default.sublime-theme",
- ctrl+shift+p, 输入PackageResourceViewer,选择
Open Resource
输入 theme 选择自己当前使用的主题:



在打开的文件中,搜索sidebar_label
// Sidebar entry font size 14
{
"class": "sidebar_label",
"settings": ["sidebar_size_14"],
"font.size": 20, // 修改字体大小
"color": [116, 116, 116] // 03
},
字体是变大了,但间距不对,全部挤一起了
修改侧栏树间距:查找 sidebar_tree修改:
// Sidebar tree padding large
{
"class": "sidebar_tree",
"settings": ["sidebar_row_padding_large"],
"row_padding": [28,10], // 修改侧边树间距
"indent": 18, // 修改侧边树间距
"indent_offset": 16,
"indent_top_level": false,
"dark_content": true
},
间距终于也正常了:

结语
如此折腾,终于勉强能使用了,虽然标签栏和一些面板的字体还是相当小,但目前暂没有好的处理方式,又不怎么影响使用。就且作罢了