Change Sublime Text 2 Font Weight
Asked Answered
P

5

14

The normal font-weight in Sublime Text was always bold.

enter image description here

Now it is really thin and i cant work with that. Can I change it back to what it was before ?

enter image description here

I have not changed anything, it just changed after i rebooted my macbook.

Thanks, Mottenmann

Profanity answered 28/9, 2013 at 12:31 Comment(2)
Is it Sublime or whole OSX as general? Might be OSX system-wide antialiasing settings. You can tune it from the command line if something has messed it up.Trenchant
True, this looks like anti-aliasing issue.Adan
B
23

Same thing happened to me. Sublime Text 2 suddenly changed to having a super thin font on my Mac.

Add

Mac:

"font_options":["no_round"], 

PC:

"font_options":["bold"], 

to

enter image description here

enter image description here

Bronson answered 14/12, 2013 at 23:14 Comment(1)
for my ST3, the solution was to remove "gray_antialias" from font_options.Florid
L
12

A simpler approach would be to simply add the weight name to the font_face (ie for medium use "Medium", for light use "Light", etc)

Before:

{
    "font_face": "Source Code Pro",
    "font_size": 16.0,
}

After:

{
    "font_face": "Source Code Pro Light",
    "font_size": 16.0,
}

The font "Source Code" comes in ExtraLight, Light, Medium, Regular, etc. And if you want use the Light version, appending the font-weight along with the font_face will work.

p.s. try Source Code Pro or Inconsolata. They are the best coding fonts till date.

Longitudinal answered 19/4, 2014 at 5:1 Comment(0)
A
1

While your issue seems to be specifically anti-aliasing in your mac, you could modify your theme to make specific text show with different fontStyle.

For example, take the Monokai Theme. Use the Preferences > Browse Packages menu shortcut and see that in the Color Schemes folder you will have a Monokai.tmTheme file. Open and edit this file to make some text look italic.

For example, for comment text... look for (around line 48):

<dict>
    <key>name</key>
    <string>Comment</string>
    <key>scope</key>
    <string>comment</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#75715E</string>
    </dict>
</dict>

To change font style to have it display in italics, add lines marked with asterisk:

<dict>
    <key>name</key>
    <string>Comment</string>
    <key>scope</key>
    <string>comment</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#75715E</string>
        *<key>fontStyle</key>   
        *<string>italic</string>
    </dict>
</dict>

For your desired effect, you would choose bold instead of italics for the fontStyle string.

Adan answered 24/10, 2013 at 22:21 Comment(0)
S
0

I've noticed this change on Sublime when I restarted my computer (Macbook Air, OSX 10.7) whilst being connected to an external monitor. To fix it, I did the following: Unplugged the external monitor, restarted Sublime, plugged monitor again.

Sinaloa answered 1/12, 2015 at 17:22 Comment(0)
G
-1

bypass alternative with:

use "font_face": "Bahnschrift Light",

instead strong text "font_face": "Bahnschrift",

some how: its notworking with font-weight

Gourmont answered 23/11, 2022 at 10:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.