Italics in themes not working

I’m trying to apply italics to certain selectors in a theme, but so far am not able to get it working. Here’s a screenshot of the code. I also have these changes open in a PR.

With these changes I should be seeing the class and id names in css as italic, which I’m not. I can change the colours, so know that the selectors are correct, it’s just the font-style that doesn’t seem to be taking.

I’ve also tried applying font-style: italic to other parts of the theme, but they also don’t see to work.

@aaronmoodie - The repo for Dracula has been moved over to Github (trying to eventually migrate it over to the Dracula Theme Org). The changes you had in the PR have been integrated into the current release. Not sure why italics aren’t working for you, as you can see in the screenshot on the extension they’re working in version 1.4.0. To be clear, I’m using JetBrainsMono for the screenshot.

1 Like

@aaronmoodie Yes, it’s possible this is font-dependent. I can’t quite tell what font you are using here. Apple’s Monaco, for example, does not have an italic variant installed on the system, so few can’t italicize it using standard fonts.

thanks @bdielman. That was an older PR, glad to see the theme has moved to GH. It was a font issue as you and @Logan suggested. I’m using Fira Code, which doesn’t have an italic font. I’m guessing Sublime and VS Code must force italicise fonts. Tried Nova with the new Dracula theme and with Jet Brains typeface and all working :+1:

1 Like

It’s possible we could consider attempting to substitute for italicized fonts by performing an affine transform on the un-italicized version (this might be what VSCode and Sublime do).

1 Like