By josh / April 19, 2014

How to change the default UI fonts in Sublime Text

It’s easy enough to change the type face and size of the fonts in Sublime’s editor window.

But now that you’ve bumped that font up so it’s not microscopic on your retina MacBook, suddenly the menus, side bar and command palette smaller than ever.

While it’s not as convenient as going from Melano to Inconsolata, Sublime does allow you to exert fine-grained control over the fonts it uses in other parts of the user interface.

These settings are controlled by the active theme. Sublime themes control the appearance of the chrome around the editor window–tabs, side bar, status bar, stuff like that. (The theme is not to be confused with the color scheme, which controls the look of the text in the editing panel, including syntax highlighting.)

You can edit the theme to tweak the appearance of individual user interface elements, including font size and weight and the type face used.

Sublime Text 2 users can find the files for the default theme under Data/Packages/Theme - Default. In Sublime Text 3, you’ll need to unzip the Packages/Theme - Default.sublime-packages file to find them.

In the Default.sublime-theme file, you’ll see a list of JSON rules that govern each piece of UI, like this:

{
    "class": "sidebar_heading",
    "color": [130, 130, 130],
    "font.bold": true,
    "shadow_color": [250, 250, 250],
    "shadow_offset": [0, 1]
},

For some examples of what you can do with this file, check out this post on the official Sublime Text forum.

P.S. If you love tweaking Sublime, you’d enjoy the Sublime Text Tips newsletter. To get it, go here:

http://sublimetexttips.com/newsletter

About the author

josh

Click here to add a comment

Leave a comment: