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.)
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.
Solution
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!