How do I install a nerd font for using in wsl with alacritty?

I downloaded a nerd font, and installed it on windows. The font shows up under configuration pannel / fonts

enter image description here

I use alacritty, so added to my alacritty.yml :

font:
  family: DejaVuSansMono NF # obtained here : https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/DejaVuSansMono.zip
  style: Regular

(nb: tried different names, DejaVu, DejaVuSansMono, DejaVu Sans Mono...)

And through alacritty launch Debian wsl in it. C:\Users\me> Debian

But the font remains the basic consolas. I can confirm this inside debian, by launching a script like test_fonts

Which results in

this

So how can I have a nerd font inside wsl with alacritty?


Solution 1:

According to the commented sample alacritty.yml from the latest release, it looks like you are missing a line in your config:

font:
  normal:
    family: DejaVuSansMono NF

The "normal" font needs to be specified. The bold, italic, and bold_italic will default to the "normal" font if you don't override them.

Tested it on the Windows portable release of Alacritty using CaskaydiaCove NF using the test-fonts.sh you mentioned. Not to mention the fact that my Fish/Starship prompt shows up correctly.