Changing font size of tabs strip in Sublime Text 3

匿名 (未验证) 提交于 2019-12-03 01:18:02

问题:

I used this answer, with a little bit help of Sublime 3 Help, I managed to port solution and change font size (and other attributes) of sidebar in my Sublime Text 3.

But how can I change (to larger) font size used by ST3 tab strip? If it is possible at all. I find filename tabs drawn with 10 pt font size quite not so comfortable on FullHD resolution screen. At least for my eyes.

回答1:

As outlined in the answer you linked to, find your .sublime-theme file. Open it up and search for tab_label. The section should look something like this:

{     "class": "tab_label",     "font.size": 12,      "font.face": "Ubuntu" }, 

Modify it according to your preferences and save the file. You should see the changes immediately.

To change the tab dimensions you can use the following section:

{     "class": "tabset_control",     "tab_height": 42,     "tab_width": 160,     "tab_min_width": 48 }, 

Note: Larger font sizes (e.g. > 12pt on my system) will get cut off, even if the tab height is adjusted accordingly. This is a well-known bug.



回答2:

set the following in your Preferences.sublime-settings

"dpi_scale": 2.0 


回答3:

To change the font size of the tab text without the bottom of the tab text being cut-off. Use @Glutanimate 's solution to start. Then you will have to tweak the dpi settings. I've seen many solutions on the web to the cut-off text issue to just change the dpi_scale to either 1.0 or 2.0 or a specific value.

What you actually need to do is change the dpi value in increments that allow the text to not get cut off for the font you have chosen. So I installed the Fira Code font and for my text to not get cut off I used a dpi value of 1.01: The below is the entire contents of my Preferences.sublime-settings file in the Packages->User file which can be accessed from the sublime preferences menu.

{ 	"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", 	"font_face": "Fira Code", 	"font_size": 15,     "dpi_scale": 1.01, 	"ignored_packages": 	[ 		"Vintage" 	], 	"line_padding_bottom": 5, 	"translate_tabs_to_spaces": true }

Notice the text in the screenshot below is not cut off and my font size is set to 14:



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!