答案 0 :(得分:10)
使用此:
"editor.fontFamily": "source code pro",
"editor.fontWeight": "300",
答案 1 :(得分:9)
编辑:TL; DR editor.fontWeight
又回来了! terminal.integrated.fontWeight
也在那里!
fontWeight
,因此Teo的建议不再适用。
相反,您可以使用确切的字体文件名(不包括完整路径和文件扩展名):
{
"editor.fontFamily": "SourceCodePro-Light"
}
我的机器上的完整列表:
/Users/sebastian/Library/Fonts/SourceCodePro-Light.otf /Users/sebastian/Library/Fonts/SourceCodePro-BoldIt.otf /Users/sebastian/Library/Fonts/SourceCodePro-Medium.otf /Users/sebastian/Library/Fonts/SourceCodePro-SemiboldIt.otf /Users/sebastian/Library/Fonts/SourceCodePro-Semibold.otf /Users/sebastian/Library/Fonts/SourceCodePro-Bold.otf /Users/sebastian/Library/Fonts/SourceCodePro-LightIt.otf /Users/sebastian/Library/Fonts/SourceCodePro-ExtraLightIt.otf /Users/sebastian/Library/Fonts/SourceCodePro-It.otf /Users/sebastian/Library/Fonts/SourceCodePro-MediumIt.otf /Users/sebastian/Library/Fonts/SourceCodePro-Black.otf /Users/sebastian/Library/Fonts/SourceCodePro-Regular.otf /Users/sebastian/Library/Fonts/SourceCodePro-BlackIt.otf /Users/sebastian/Library/Fonts/SourceCodePro-ExtraLight.otf
答案 2 :(得分:1)
在 vscode 1.53.2 上测试
macOS:
{
"editor.fontFamily": "'SourceCodePro-ExtraLight'"
}
视窗:
{
"editor.fontFamily": "'Source Code Pro ExtraLight'"
}