windows 如何在 VS Code 编辑器中指定粗体?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36085443/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to specify bold font in VS Code editor?
提问by sunny moon
How to specify a boldfont in VS Code's settings.json
? For example, I have Envy Code R
and Envy Code R Bold
(exact names shown in windows' font viewer) installed on my windows machine, and while
如何在 VS Code 中指定粗体字体settings.json
?例如,我在我的 Windows 机器上安装了Envy Code R
和Envy Code R Bold
(Windows 字体查看器中显示的确切名称),而
"editor.fontFamily": "Envy Code R"
setting works fine,
设置工作正常,
"editor.fontFamily": "Envy Code R Bold"
doesn't work (a fallback font is used instead).
不起作用(改为使用后备字体)。
Is that possible to do at all? There are no any other font settings like fontWeight
or fontStyle
. I also tried specifying other fonts with bold variants to no avail. VS Code 0.10.11
here.
这有可能吗?没有任何其他字体设置,例如fontWeight
或fontStyle
。我也尝试用粗体指定其他字体无济于事。VS 代码0.10.11
在这里。
回答by Lucas925
In your settings.json .vscode add this line:
在您的 settings.json .vscode 中添加以下行:
"editor.fontWeight": "bold"
回答by tripdubroot
This is a bug with Atom: https://github.com/atom/atom/issues/3790
这是 Atom 的一个错误:https: //github.com/atom/atom/issues/3790
A workaround is to strip spaces and add a hyphen between the font name and the weight.
解决方法是去除空格并在字体名称和粗细之间添加连字符。
Envy Code R Bold == EnvyCodeR-Bold
ref: https://github.com/Microsoft/vscode/issues/381#issuecomment-163356103
参考:https: //github.com/Microsoft/vscode/issues/381#issuecomment-163356103
回答by Freestyle09
Alternative way:
替代方式:
On MAC go to Code-> Preferences-> Settingsor press shortcut CMD+ ,
在 MAC 上转到代码->首选项->设置或按快捷键CMD+ ,
In search bar just write font and you should find:
在搜索栏中只写字体,你应该找到:
Editor: Font Weight
编辑:字体粗细
And from there you can choose your font weight from 100 to 900
然后你可以从 100 到 900 中选择你的字体粗细