Sublime Forum

Monospaced fonts still do not display their respective bold and italic variants on #3131

#1

Hey there, I read about and saw that Windows and Linux builds were fixed to display their proper font variants in #3127 (or something along those lines)
but I’m on 3131 using a variety of different fonts that still do not display correctly.
Fonts tested:

  • Office Code Pro [and Office Code Pro D] - works on mac, however does not on windows
  • SF Mono - works on mac, not windows
  • Monaco

Working fonts:

  • Consolas
  • Operator Mono
  • Luxi Mono

I’ve looked around and seen some suggestions or settings to tweak but nothing’s worked so far
Any tips or pointers are appreciated <3

0 Likes

#2

my understanding is that a few more tweaks have been made since 3131 - try 3140, to see if it makes any difference

also, are you sure that those fonts don’t have different widths in italic/bold compared to normal weight? you can check the ST console for messages that indicate problems.

0 Likes

#3

The only change was made that if an italic and the regular are monospace, but bold is a different width, then we now enable the italic. Previously if either bold or italic were a different width, neither would be enabled.

We still won’t use bold, italic or bold/italic fonts if they are a different width than the regular face.

1 Like

#4

And to clarify, this is based on measuring the glyphs actually drawn to a buffer. Each platform has it’s own text rendering engine, so the results very likely could be different.

On Windows you may see different results with "font_options": ["gdi"] and "font_options": ["directwrite"]. We now default to directwrite, except for Consolas and Courier New. The default can be overridden by the "font_options" setting. In general gdi is going to be less “correct”, but may look more familiar.

4 Likes

#5

So Sublime Text 3 determines whether a font is monospace by writing some text to a buffer and measuring the widths?

0 Likes