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

问题描述 投票:5回答:2

Source Code Pro

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

Source Code Pro ExtraLight

visual-studio-code
2个回答
10
投票

用这个:

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

9
投票

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

fontWeight在最新版本的VSCode中不可用,因此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

© www.soinside.com 2019 - 2024. All rights reserved.