0

Using WSL Bash, I followed both sets of the steps from this question's answer (only the first set of steps worked) but I get strange behaviour for the font. The font does show up in my text editors but would not render properly. For example, the font I installed was sans-serif but would show up as a serif one. Additionally, the font doesn't show up in the Fonts settings.

If I use the font for WSLTTY, I get the following error message:

Font installation corrupt, using system substitute:
UbuntuMono NF

WSLTTY startup error message

How can I properly install the files from WSL Bash?

Daniel
  • 150
  • 1
  • 11

1 Answers1

0

The issue was due to how file permissions were applied when using WSL Bash.

The font file that was moved to /mnt/c/Windows/Fonts was missing the users with Read & execute permissions:

  • ALL APPLICATION PACKAGES
  • ALL RESTRICTED APP PACKAGES
  • Users

Here are the full WSL Bash installation steps which must be run in an elevated terminal (right-click and run as Administrator):

# Let 'my font.ttf' be your font in the current working directory.

icacls.exe 'my font.ttf' /grant 'ALL APPLICATION PACKAGES':RX icacls.exe 'my font.ttf' /grant 'ALL RESTRICTED APP PACKAGES':RX icacls.exe 'my font.ttf' /grant Users:RX

mv 'my font.ttf' /mnt/c/Windows/Fonts/

reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"
/v "my font (TrueType)"
/t REG_SZ
/d "my font.ttf"
/f

Daniel
  • 150
  • 1
  • 11