macOS VSCode terminal uses powerline font configuration

Problem Description

Because itern and zsh are used to replace the original terminal, and other themes and powerline fonts are used, the terminal in vscode cannot be displayed normally (garbled). This article will solve the problem.

problem lies in

Normally, just add the corresponding fields in the settings.json configuration file:

"terminal.integrated.fontFamily": "Menlo for Powerline"

However, the problem was not solved after setting up. After research, it is found that the font file is not in the original font installed using ttf /Library/Fonts/, so only the font needs to be placed in this path, and the configuration can be effective.

Solution

Install font files

cd /Library/Fonts
git clone https://github.com/abertsch/Menlo-for-Powerline.git

Configure vscode

# 修改vscode配置文件settings.json
# 添加字体配置
"terminal.integrated.fontFamily": "Menlo for Powerline"

After the configuration is complete, you can.

Guess you like

Origin blog.csdn.net/weixin_37272286/article/details/114460338