Sublime Forum

Proportional fonts lose italic/bold syntax highlighting

#1

In Packages/User/MultiMarkdown.sublime-settings , I have:

{ "font_face": "Calibri", "font_size": 18, "color_scheme": "Packages/User/EspressoMarkdownEditor.tmTheme" }

With this, bold and italic syntax highlighting are lost in MultiMarkdown files. The face setting and size do take effect, and the color scheme’s colors also appear—just not bold and italic.

Other fonts (e.g. Courier New) work fine (i.e. with bold and italic).

Is Calibri somehow incompatible? What sorts of fonts are, and are not, OK to use?

EDIT: ST2 Build 2217 on Mac.

EDIT 2:
Experimenting suggests that any monospaced font works, and all proportional fonts fail.

When editing Markdown, a proportional font is a big plus. Probably for other text-type formats as well.

This appears to just be a bug? Proportional fonts works in every way except that bold and italic get lost.

I’m trying out ST primarily as a Markdown editor, so this is possibly a deal-breaker…

0 Likes

Italic/bold not working
Italic/bold not working with `Roboto Mono` when `directwrite` on Windows
#2

Bump.

This is still an issue as of ST3 3047 on Windows 7 x64.

0 Likes

#3

Bump. Still an issue on ST3 3059 on Mac.

0 Likes

#4

Bump!

0 Likes

#5

I developed a font with proportional and monospaced, and I’ve had multiple users tell me that they’ve run into this issue in SublimeText with the proportional versions. So +1 from me on getting this fixed. Much appreciated!

0 Likes

#6

bump

0 Likes

#7

Bump. Still an issue in ST3 Build 3065 on Mac

0 Likes

#8

Proportional italic & bold syntax highlighting in ST3 — is 2015 your year?

0 Likes

#9

Bump. Still an issue in ST3 build 3103 on Mac.
Is 2016 your year :slightly_smiling:?

0 Likes

#10

As far as I understand it, this is designed this way on purpose. I doubt it will change.

The way the syntax highlighting in Sublime Text works, any change to the buffer can result in the scopes applied to various syntax elements to be changed. Those changes in scope can cause the style to change. Because of that, any font that changes in width via bold or italic can not be used. Otherwise, typing a single character could cause the whole text buffer to reflow and the cursor to jump to a different place, and lines to be word-wrapped int different ways.

You don’t run into this in a normal prose editor since typing a character can’t change the style and proportions of text preceding it.

2 Likes

Operator italic is not displaying as set by the theme
Italic/bold not working
#11

This is unfortunate as I use ST3 as a prose/markdown editor.

0 Likes

#12

Build 3127 will now print a notice in the console if a font’s italic and bold face can’t be used due to varying widths.

4 Likes

#13

Is the reflow issue that much of a problem, though? That is how it works in e.g. JetBrains IDEs, and yes, sometimes you can see some lines re-wrap and the cursor shifts its position. I’ve never thought of that as a problem. Would it be easy to add an option to enable italic and bold with proportional fonts? It seems I’m not the only one to want this.

1 Like