系统字体安装
# refer to https://github.com/powerline/fonts
cd
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
Windows 用户可能无法执行 ./install.sh 。需要先按 Windows + x 调出 WinX 菜单,然后按 a 以管理员权限运行 PowerShell ,修改执行策略并执行 install.ps1
set-executionpolicy bypass
./install.ps1
set-executionpolicy default
设置终端字体
在不同的终端上设置字体的方法也不同。
VS Code
修改 settings.json
{
"terminal.integrated.fontFamily": "Meslo LG S for powerline",
"terminal.integrated.defaultProfile.linux": "zsh"
}
PuTTY
设置字体为 DejaVu Sans Mono for Powerline

cmd
设置字体为 DejaVu Sans Mono for Powerline

MacOS Terminal
设置字体为 Meslo LG S for powerline

该博客详细介绍了如何在不同操作系统中安装和设置Powerline字体,包括Windows、macOS和Linux。在VSCode、PuTTY和cmd中配置终端字体,以实现更美观的代码显示。步骤包括克隆Powerline字体库、安装字体以及修改终端配置文件,特别提到了Windows用户需要使用PowerShell并更改执行策略。
6335

被折叠的 条评论
为什么被折叠?



