尝试通过settings.json自定义Windows终端,我找到了一个与新约定足够接近的profiles.json,在将其粘贴到settings.json时它能够正常工作(我知道它起作用是因为主题改变了)。问题在于,“fontFace”更改没有任何效果。我正在尝试在某些powerline内容中使用nerd font,在运行于ConEmu的Powershell中可以使用,但在Windows终端中不行。以下是settings.json的相关部分:
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,
// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
// and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
"cursorShape": "vintage",
"fontFace": "Iosevka Nerd Font"
},
"list":
[
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"fontFace": "Iosevka Nerd Font",
"colorScheme": "PowerShellTom",
"useAcrylic": true,
"acrylicOpacity": 0.8
},
{ ...
我在Windows Terminal Preview中看到了相同的行为,这个版本应该是最不"前沿"的版本。
即使尝试使用非技术人员字体作为"fontFace",也没有效果,但是"fontSize"会起作用。