I've come across this in user settings "editor.fontFamily": "Consolas, 'Courier New', monospace",
but is there any way to change only the font of comments? I've seen people have semi cursive comments in other editors and I'd like to be able to replicate something similar.
You can select font and color which you want. Show activity on this post. OR press CTRL + , (for windows only) you'll see settings page there find text editor option tab on left side then click on ' Font ' then add any valid font family name there which you want to apply to vscode.
You can change the font style with the editor.tokenColorCustomizations
setting:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment",
"settings": {
"fontStyle": "italic"
}
}
]
}
I don't think there's a way to change the font family right now. The setting only allows customizing fontStyle
and foreground
(text color). There's an open feature request for adding support for it though:
Support fontName in textMateRules (#36512)
I had the same issue and it seems you can only make comments italic but cannot change to a separate font. I ended up combining a regular and italic font I liked into a font family which worked.
Download a font editor (FontForge) and create a font family of your own (ex: Custom Font) by changing a regular font you like to Custom Font Regular.ttf and an italic font you like to Custom Font Italic.ttf. Just keep the family name the same.
FontForge Example:
Pretty straightforward and works great in VS Code. Hope this helps somebody
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With