Bold and Italic styles in Sublime Text 2 #32

smlombardi opened this Issue Oct 12, 2012 · 16 comments


None yet
5 participants

In Sublime Text 2, to name just one, a language syntax might have some code selectors as Bold or Italic. When using this font, everything appears in regular weight & style in spite of that.

If I had to guess, I'd say most of these apps are just looking for a simple -bold and -italic in the font name, whilst SPP have more complicated naming structure in this family.

Any ideas?


miguelsousa commented Oct 12, 2012

How are you enabling Bold and Italic in ST2 with other font families (e.g. Arial)?
What are your user settings, and which file format are you using? It would be also good to have a sample of the text you're trying to style.

According to this page -- Bold and Italic font support to display keywords text -- font styling is supported in ST2, but I haven't found the way to turn it on.


miguelsousa commented Oct 12, 2012

OK, I think I figured it out. Selecting the Sunburst color scheme, and Markdown as the language the text displays with Bold and Italic. Then setting the User font to Source Code Pro I get this, sublime
I see that the Bold font is working. The Italic is not because Source Code Pro does not have italics, and Sublime Text 2 is not fauxing them.

ST2 is "fauxing" italics for me.
If you paste body{background-color:#92000D;} into ST2 and set the syntax to CSS it will make background-color italic.

I have used other fonts, such as Bitstream Vera Sans Mono, which has the more typical 4 fonts, work perfectly in ST2. If the syntax has bold, I get bold. And real italics. Even though the SCP download has other weights and styles, this font WON'T display them in ST2. That's my issue. Vera Sans = works. SCP = no works.

And this is how themes set it:


Yes, I find it hard to understand why SCP comes with 2 different light weights and a SEMIbold, yet no italics.

FWIW, be sure to set your font in ST2 to "font_face": "SourceCodePro-Regular"


miguelsousa commented Oct 12, 2012

@Francisc Are you sure you have ST2 set to use SCP? I'm not seeing italics being fauxed.

@smlombardi By setting "font_face" to "SourceCodePro-Regular" you're hard-coding all font styling to that particular font. What you need to use is the name of the family, like so, "font_face": "Source Code Pro"

Bold does indeed work, but I see no itals.



miguelsousa commented Oct 13, 2012

Good you got it sorted out.
For italics you can add your voice to issue #6

I did. It's nice to have the option. Check out Vera Sans or Ubuntu Mono to see.

@smlombardi smlombardi closed this Oct 13, 2012

Hi Miguel,

Here's how it looks on Windows:


The plugins that I have installed shouldn't be interfering.
The version I have installed is the Dev version which is ahead of the Stable one.


miguelsousa commented Oct 14, 2012

Thanks, that's good to know. Are you able to say if this fauxing is a feature of the Windows version or if it's something that will be available on all platforms in the future?

I've no idea. The Dev version is available to everyone. (
I've made a clean install of ST2 Dev and I get the same.
It's not plugins that do that, it comes out of the box.


miguelsousa commented Oct 14, 2012

The feature is not available on the Mac. I tried the latest Dev build (#2220) and the font does not get slanted.

Must be Windows-specific.
Maybe Mac OS checks if italics exists and does not slant if not found?

incace commented Feb 6, 2014

Help! I'm having the same issue as @Francisc is/was... I am on Mac OS, only CSS files are affected. Did anyone ever figure out a fix?

@pauldhunt pauldhunt added the question label Jun 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment