Fixing Italic in Visual Studio Code

VS Code themes can italicize certain text. For example, Cobalt2 italicizes all comment text. One exception is the | symbol in macOS environment, which greatly improves table legibility. (Yes, I use markdown tables in comments.)

In the comments, the ‘|’ symbol is straight on macOS and tilted on Windows

The default font-family setting in VS Code for Windows is as follows. When the Cobalt2 Theme is rendered with Consolas, | is tilted in the comments.

Consolas, 'Courier New', monospace

Changing the font-family to D2Coding did not fix the issue. Every font other than Courier New seemed to render tilted | symbol on Windows.


Resetting font style using this setting does fix the problem. It can also be applied in the user level by adding it to the settings.json in the AppData.

settings.json containing user level preferences in Windows

However, I just decided to use a different theme. GitHub Theme works!

GitHub Dark color theme applied to VS Code in Windows



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Node.js and web developer using TypeScript. Undergraduate in Seoul National University.