'Font issues while integrating ZSH on Visual Studio Code

I'm trying to integrate zsh on my VSC setup but apparently arrows are not recognized by it.

enter image description here

My zsh theme is agnoster and I've already tried adding "terminal.integrated.fontFamily": "Meslo LG M DZ for Powerline" with no success. Anyone experienced something like this and can give me a hand? Thanks.



Solution 1:[1]

Following this little guide solved the issue making-powerline-work-in-visual-studio-code-terminal.

IMPORTANT: if you already have a powerline font installed (e.g. it looks fine inside your system terminal), skip step 1.

  1. Install a patched version of your desired font directly from https://github.com/powerline/fonts. Apparently doing the "quick installation" (e.g. sudo apt-get install fonts-powerline) does not work in this case. So you can install manually downloading the .ttf file directly or running the install script ./install.sh provided. For instance you can do the following:

    1. Clone the repository:

      git clone https://github.com/powerline/fonts && cd fonts
      
    2. Run ./install.sh to install them all or install one specific font by going inside its directory and opening the .ttf file. For instance, manually installing DejaVu Sans Mono for Powerline:

      • cd DejaVuSansMono
      • Open DejaVu Sans Mono for Powerline.ttf
      • Install the font
  2. Add the terminal.integrated.fontFamily to your User Settings settings.json in VSCode specifying the powerline font to use. For instance, if I want to use DejaVu Sans Mono for Powerline:

    {
        [...]
        "terminal.integrated.fontFamily": "DejaVu Sans Mono for Powerline",
        [...]   
    }
    
  3. Restart Visual Studio Code

Solution 2:[2]

Finally made it work after going through many blogs and GitHub comments. The below steps works for macOS.

  1. Clone the Menlo for powerline font
git clone https://github.com/abertsch/Menlo-for-Powerline.git
  1. Open this folder in finder. Double click on Menlo for Powerline.ttf file.

  2. Click on Install Font

  3. Open the settings.json file in VSCode and add the below line.

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

If you still can't see the fonts in the terminal try restarting VSCode.

You can use the above steps to use any font you want.

Solution 3:[3]

For me it worked for linux and as well as manjaro (i don't know why others solution weren't working for me).

Download this font download font from here , Then create a folder named "Meslo" and extract all the fonts inside it.
Move this folder to /usr/share/fonts/truetype/
Run this command:

sudo fc-cache -vf /usr/share/fonts/

In settings.json of vscode add this line:

"terminal.integrated.fontFamily": "MesloLGM Nerd Font"

Save and Restart if necessary, it should work. Done.

Solution 4:[4]

If you already have a font installed which is looking fine in your terminal app (for example in iTerm2) and the font is just messed up inside VSCode, you don't have to install any additional fonts. Just add:

{
  ...,
  "terminal.integrated.fontFamily": "YourFontName"
}

to your settings.json where YourFontName is the name of the font you would like to use. On macOS you can see what fonts you have installed in your font book (search for font book in the spotlight Command + Space) which looks like this:

font book on macOS

In my case my settings.json has the following entry:

{
  ...,
  "terminal.integrated.fontFamily": "MesloLGS NF"
}

Solution 5:[5]

Solution 6:[6]

I had the same problem with my VS Code, WSL terminal (PowerLevel10K) on Windows 10. It looked exactly like yours. I found that my Terminal>Integrated:Font Family was named incorrectly. I use "DroidSansMono Nerd Font". I had entered it as "Droid Sans Mono Nerd Font".

Incorrect Entry

That is not the way the font name shows up in programs like Word, Notepad or Photoshop. When I entered as it was shown in notepad,

Used Notepad to Check Font Name

I closed and reopened my VS Code terminal and everything rendered as expected.

Correct Entry

So check your installed font name in your operating system's word processing software and see how it is listed. Enter it likewise into Terminal>Integrated:Font Family and your VS Code terminal should render correctly also.

Solution 7:[7]

I had the same exact issue on my Macbook. The problem was that the font I was using in Iterm was not added in the Terminal of VSCode.

Issue

Fix

fix was simple, you have to go to open Iterm -> Preferences -> Profiles -> Text and copy the Font NameiTerm 2

now head over to VS Code:

  • Open settings
  • In the search bar, type Terminal Font
  • Paste the font name in Terminal > Integrated: Font Family vs code font family

and that will fix the issue for you!

issue fixed

Solution 8:[8]

Most of the other answers didn't solve the issue for me in Manjaro Linux (KDE).

I eventually found a solution that made the Powerline glyphs visible in my VS Code zsh terminal:

https://forum.manjaro.org/t/kde-powerline-glyphs-missing-in-vscode-integrated-terminal-only/63742/3

Just set the font to NotoSansMono Nerd Font. This font was already installed on my system. I did not need to download any additional fonts.

There are two ways to change the font in VS Code:

  1. Change the following line in settings.json:

    "terminal.integrated.fontFamily": "NotoSansMono Nerd Font"
    
  2. Alternatively, go to Settings -> Features -> Terminal and set Terminal > Integrated: Font Family to:

    NotoSansMono Nerd Font
    

You may need to restart VS Code.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2
Solution 3 Reza Rahemtola
Solution 4 Dimitri Podborski
Solution 5 reyqueson
Solution 6 John
Solution 7 Ansub
Solution 8