27

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.

Community
  • 1
  • 1
trejder
  • 17,148
  • 27
  • 124
  • 216

5 Answers5

46

As outlined in the answer you linked to, find your <theme>.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.

Glutanimate
  • 1,692
  • 20
  • 21
  • 1
    Thanks for your enlightening answer. By doing some experiments, I managed to figure out, that the same bug occurs for sidebar. When setting `font.size` attribute to a value higher than `15.0` for sidebar, entries on it also becomes cut off. – trejder Sep 04 '14 at 08:37
  • 1
    @Glutanimate Where is the `.sublime-theme` file located? It's nowhere to be found with ST3. – TheRealFakeNews Nov 04 '16 at 07:26
  • 3
    @AlanH -- Read this answer you can get to it with PackageResourceViewer. http://stackoverflow.com/a/23046654/209003 – Paul J Nov 09 '16 at 21:07
21

set the following in your Preferences.sublime-settings

"dpi_scale": 2.0
faham
  • 842
  • 11
  • 17
9

As of December 2020, the above answer referencing the dpi_scale setting does NOT work (using Sublime Text 3.2.2). The name of this setting was changed to ui_scale.

Go to Preferences | Settings

Then add the following (vary 1.3 as appropriate).

   "ui_scale": 1.3

Once you change this, you'll need to restart Sublime.

Credit @Marco Sulla for the correct reply above (its just kind of hidden in a comment).

Also Helpful:

  • Install the PackageDev plugin
  • This makes it very easy to edit your current theme via PackageDev: Edit Current Theme

You can also set the Tab fonts to bold like this by adding the following rule to your current theme:

{
    "rules": [
        {
            "class": "tab_label",
            "font.bold": true,
            "font.size": 14
        }
    ]
}
Lance
  • 682
  • 6
  • 12
  • 1
    This solves the problem at source without the need to set it up per theme. This also covers other aspects of the UI, such as the bar at the bottom, so solves the accessibility problem underneath, it should be the accepted answer – Toni Leigh Feb 14 '22 at 12:09
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: enter image description here

Christopher Adams
  • 1,240
  • 10
  • 14
0

Add this under Preferences->Customize Theme

{
    "variables":
    {
        "font_size_sm": 22, //set some and save the file to see the result
    },
    "rules":
    [
        
    ]
}
gkubed
  • 1,849
  • 3
  • 32
  • 45