Properly Updating the Theme Font in Sublime Text 4 So Far

It's been almost a year since I published how to override your ST4 Theme Font. But I encounter an issue where even my old settings are insufficient to fully override font settings.

By Ace Z. Alba

Published on May 19, 2024, 11:45 am

Category: tutorial

Tag: sublime text 4, customization, settings

It's been almost a year since I published how to override your ST4 Theme Font. But I encounter an issue where even my old settings are insufficient to fully override font settings. I found myself having to use the GruvBox package theme, and that old JSON override was not enough. It appears that some settings have shifted and some have been added.

So I am sharing with you my new JSON settings. This time, for both .sublime-theme and .sublime-color-scheme. Change your currently active theme and color scheme with these settings accordingly.

.sublime-theme.

{
    "variables":
    {
        "font_face": "JetBrains Regular",
        "font_size_sm": 11,
        "font_size": 12,
        "font_size_lg": 14,
        "font_size_title": 28,
    },
    "rules":
    [
        {
            "class": "sidebar_heading",
            "font.face": "var(font_face)",
            "font.size": "var(font_size_lg)",
            "font.bold": true,
        },
        {
            "class": "sidebar_label",
            "font.face": "var(font_face)",
            "font.size": "var(font_size_lg)"
        },
        {
            "class": "tab_label",
            "font.face": "var(font_face)",
            "font.size": "var(font_size)",
        },
        {
            "class": "kind_label",
            "font.face": "var(font_face)",
        },
        {
            "class": "quick_panel_path_label",
            "font.size": "var(font_size_sm)",
        },        
        {
            "class": "quick_panel_label",
            "font.face": "var(font_face)",
            "font.size": "var(font_size_lg)",
        },
        {
            "class": "text_line_control",
            "font.face": "var(font_face)",
        },
        {
            "class": "label_control",
            "font.face": "var(font_face)",
            "font.size": "var(font_size)"
        },
        {
            "class": "title_label_control",
            "font.face": "var(font_face)",
            "font.size": "var(font_size_title)"
        },
        {
            "class": "tool_tip_label_control",
            "font.face": "var(font_face)",
            "font.size": "var(font_size_sm)",
        },
        {
            "class": "vcs_changes_annotation",
            "font.face": "var(font_face)",
            "font.size": "var(font_size_sm)",
        },
    ]
}

.sublime-color-scheme.

{
    "variables":
    {
    },
    "globals":
    {
    },
    "rules":
    [
        {
          "name": "Markdown Heading",
          "scope": "markup.heading",
          "font_style": "bold",
        },
    ]
}