Sublime Forum

How to make comments in italics?

#1

How can I get my comments to be in italics? When I edit my Sublime theme using the online theme visual editor, it clearly shows that the font should be in italics. I’m just looking for the most hassle-free way, quick way to fix this problem.

0 Likes

#2

You should use an font that has an italic variant. What font are you using?

0 Likes

#3

I’m using probably one of the most popular fonts on Windows… Lucida Console. It definitely has an italics variant. However, I noticed in Notepad, the italics variant is called, “Oblique”.

I even tried replacing the font style to from italics to oblique in the Sublime Theme. I’ve seen a lot of posts here that refer to Lucida Console font; surely, there’s gotta be a way to get it to show in italics.

<dict> <key>name</key> <string>Comment</string> <key>scope</key> <string>comment</string> <key>settings</key> <dict> <key>fontStyle</key> <string>oblique</string> <key>foreground</key> <string>#888888</string> </dict> </dict>

0 Likes

#4

Try <string>italic</string> instead of <string>oblique</string> :wink:

0 Likes

#5

Originally I had the below setting. It was created using the only theme editor (see first post). Since that did NOT work, I tried using oblique instead.

So, what’s the trick to make this work? What do all the people who use Lucida Console font do when they want it to show italic?

		<dict>
			<key>name</key>
			<string>Comment</string>
			<key>scope</key>
			<string>comment</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#888888</string>
			</dict>
		</dict>
0 Likes

#6

So, is this impossible to do? Maybe I’m missing something really basic. This font is after all very popular for script writing; at least on Windows.

PS: Bold style doesnt work either. It’s pretty frustrating; since I use this same font in all other software without any issues with italics or bold. Seem like something is fundamentally wrong in the way SB3 uses font styles. :cry:

0 Likes

#7

Is there any kind of solution for this? I’m still puzzled why a popular font like Lucida Console doesnt seem to have a straightforward way to show in italics using ST3. I dont have issues with any other application getting it to show in italics.

0 Likes

#8

I have exactly the same question!
Lucida Console is my favourite font and I want to use it so badly in ST3!
Bold and italic, both font styles don’t work!
WHY???

0 Likes

#9

At least on my Win machine, Lucida Console does not come with either bold or italic variants. Other software probably creates faux bold and italic.

I thought that Sublime creates faux italic as well, but this might be dependent on the OS. (I’m looking at my Linux machine now and I can see italic with Fira Mono, which is definately fake.)

0 Likes

#10

Oh, yes I checked my windows/fonts folder and lucida console is only available as ‘regular’.
Mhh…so can’t sublime create those faux bold and italic variants on windows?
Would it be possible to generate an own italic true type font variant? Any tipps, how to do that?

0 Likes

#11

Possibly relevant: github.com/SublimeText/Issues/issues/279

0 Likes