Sublime Forum

Sublime can't make keywords bold anymore on Linux



For some reason, Sublime Text 2.0.1 build 2217 can’t make keywords bold anymore with some fonts. I’m using Ubuntu Linux 12.04. This was working a few weeks ago, and I’m not sure if the bug was triggered by an update in Ubuntu or an update in ST2. Here is a screenshot of ST with default configuration:
Note that the var and function keywords are not bold. This is not a theme or color scheme problem, I have checked.

If I change the font to Courier New, it works fine:

However, most fonts don’t work. Here is another example with Monospace:

The only thing that changed between screenshots is the font_face setting. The rest of the configuration is the default. As I said before, this was not happening some weeks ago.

Please let me know if you can confirm the bug.



ST2 font_face + font_style

It’s not a bug. For bold (or, similarly, for italic) to work you need:

  • A color scheme that uses bold. (You got that.)
  • A monospace font. (The font in your first screenshot is variable width.)
  • A font that includes bold weight. (Monospace, the font in your third screenshot, does not support bold.)

Courier New satisfies both conditions, which is why it works.

On Ubuntu I use Liberation Mono. (I prefer Droid Mono, but it lacks bold & italic.) Various people like Meslo. There are many other fonts that provide real bold, including, for example, Consolas, but not, unfortunately, Inconsolata. Et cetera.

(FWIW: Ubuntu fakes the bold weight & italic style when the typeface does not provide these. That really confused me at some point.)



Thanks!. I’m using Deja vu sans mono now and it works pretty good. I was confused by how various ubuntu apps use Monospace with bold font.