系统字体安装
# 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