简体   繁体   English

如何使用 $Profile 更改 powershell 中的字体

[英]How to change my font in powershell using $Profile

I am trying to work on customizing my powershell 7 experience using $Profile and settings.json.我正在尝试使用 $Profile 和 settings.json 自定义我的 powershell 7 体验。 The first issue I am running into is that when I call我遇到的第一个问题是当我打电话

oh-my-posh init pwsh | oh-my-posh 初始化 pwsh | Invoke-Expression Import-Module posh-git调用表达式导入模块 posh-git

in $Profile to access the updated nerdfont I have downloaded "CaskaydiaCove NF Mono" it does not load into my environment.在 $Profile 中访问更新的 nerdfont 我已经下载了“CaskaydiaCove NF Mono”它没有加载到我的环境中。

Note: There is every possibility that I am looking in the wrong place so feel free to suggest other avenues to accomplishing this.注意:我很有可能找错了地方,所以请随意建议其他途径来实现这一目标。

I have successfully been able to get it to work by Launching terminal, editing the settings on the GUI and then launching powershell 7 from the dropdown.通过启动终端,编辑 GUI 上的设置,然后从下拉菜单中启动 powershell 7,我已经成功地让它工作了。 However I want to be able to manually make changes with $Profile and settings.json.但是我希望能够使用 $Profile 和 settings.json 手动进行更改。

It seems like the issue is that I don't have a command in my $Profile to connect to settings.json to allow it to read the file but I cannot find a recommendation on how to do that.问题似乎是我的 $Profile 中没有连接到 settings.json 以允许它读取文件的命令,但我找不到有关如何执行此操作的建议。

The font is a setting of your terminal, not Powershell. So, have a look at the docs for your terminal on how to change the font there once it's installed on your system.字体是终端的设置,而不是 Powershell。因此,请查看终端的文档,了解如何在系统上安装字体后更改那里的字体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM