Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Powerline fonts on WSL?

I'm using Windows Subsystem for Linux (WSL 2) with Oh My Zsh to pimp my bash, but I can't make the Ubuntu terminal render the Powerline fonts properly. Any idea on how to set up WSL to work with these fonts?

enter image description here

like image 767
Nícolas Iensen Avatar asked Jul 29 '20 07:07

Nícolas Iensen


People also ask

How do I install powerline WSL?

In Windows, open the file by double-clicking on it. It will show two options: Print and Install . Choose Install . Right-click on the WSL terminal's title-bar > Properties > Font > DejaVu Sans Mono for Powerline.


2 Answers

I was installing the fonts in the Ubuntu system, but it is Windows that is rendering the characters from the terminal, so I should install the fonts on Windows (facepalm).

I followed this blog post to install the Powerline fonts on Windows, and then I had to change the font in the settings of the WSL terminal:

enter image description here

I selected the font DejaVu Sans Mono for Powerline, which works well with the robbyrussell theme of Oh My Zsh, but there are other options.

Running the same command now rendered the characters as expected:

enter image description here

The shell command I used to test the Powerline fonts came from this GitHub gist.

like image 58
Nícolas Iensen Avatar answered Sep 22 '22 09:09

Nícolas Iensen


  1. Download the required .ttf file from the powerline github repo.
  2. In Windows, open the file by double-clicking on it. It will show two options: Print and Install. Choose Install.
  3. Right-click on the WSL terminal's title-bar > Properties > Font > DejaVu Sans Mono for Powerline.
like image 45
SomajitDey Avatar answered Sep 20 '22 09:09

SomajitDey