我在用户设置中遇到过这个问题 "editor.fontFamily": "Consolas, 'Courier New', monospace",
但是有没有办法只改变评论的字体?我看到人们在其他编辑器中有半草书评论,我希望能够复制类似的内容。
最佳答案
您可以使用 editor.tokenColorCustomizations
更改字体样式。环境:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment",
"settings": {
"fontStyle": "italic"
}
}
]
}
我认为现在没有办法改变字体系列。该设置只允许自定义
fontStyle
和 foreground
(文字颜色)。不过,有一个开放的功能请求可以添加对它的支持:Support fontName in textMateRules (#36512)
关于visual-studio-code - 有什么方法可以更改 VSCode 中仅注释代码的字体系列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48838578/