在Visual Studio代码中使用源代码Pro ExtraLight

时间:2016-08-14 15:07:03

标签: visual-studio-code

Source Code Pro

如何在VSC中使用ExtraLight~? 似乎以下不起作用...... 我确定我有字体。

Source Code Pro ExtraLight

3 个答案:

答案 0 :(得分:10)

使用此:

"editor.fontFamily": "source code pro",
"editor.fontWeight": "300",

答案 1 :(得分:9)

编辑:TL; DR editor.fontWeight又回来了! terminal.integrated.fontWeight也在那里!

最新版本的VSCode中没有

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'"
}