Font issues while integrating ZSH on Visual Studio Code

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

Leave a Comment