0

I've been having a problem with a python package that I maintain: the fonts displayed by my package appear differently when run on my recent WSL Ubuntu installation, compared with how they appear on three other Ubuntu installations that I use.

I eventually tracked the problem down to the fact that in the installations that work ok, there are dozens of different fonts in the /usr/share/fonts/truetype/ directory, but in my WSL ubuntu I see only dejavu.

dino@DINO:/usr/share/fonts/truetype$ ls -l
total 0
drwxr-xr-x 1 root root 512 Aug 21 13:52 dejavu

I am trying to figure which fonts should be in /usr/share/fonts/truetype/ immediately after installing any given Ubuntu distro (or any disto of linux for that matter), but I can't seem to find this information.


Where I can find out what fonts should come with any specific Ubuntu distribution? Thanks.


5
  • Can you please share the screenshots of different font appearances? – Kulfy Sep 3 '20 at 21:35
  • The different font appearances are irrelevant. (If you are really interested you can see them here). I have already debugged that problem and determined that the application is looking for LiberationSans. On 2 of my 3 Ubuntu distros it finds it (here: /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf) but on my WSL Ubuntu the application falls back to the only font it can find, which is DejaVuSans. Trying to understand why WSL Ubuntu has only the one truetype font. – Daniel Goldfarb Sep 3 '20 at 22:00
  • Your problem may have to do with the fact that WSL is not intended for graphical applications, much less a desktop environment. docs.microsoft.com/en-us/windows/wsl/… – Nmath Sep 4 '20 at 0:44
  • @Nmath It is true that WSL by itself does not support linux graphical applications, but this is not an issue. You simply install a windows-based Xserver such as VcXSrv, and then configure (via .bashrc) your WSL linux to use the windows-based xserver. It works like a charm. It is clear that WSL Ubuntu now does not include the fonts listed in the answer below. I fixed my problem by manually installing them. At this point I would just like to get verification that WSL Ubuntu used to ship with fonts. – Daniel Goldfarb Sep 4 '20 at 1:46
  • I don't think Ubuntu server has ever shipped with a bunch of fonts. Why would it? Nobody's saying you can't tinker and play all you want with WSL, or that you can't get a desktop or GUI software to run. But at the end of the day, you have a very large toolbox in terms of ways to run Linux/Ubuntu software. Usually it's best to choose an appropriate tool for the job. – Nmath Sep 4 '20 at 6:06
1

I am running Kubuntu 20.04 LTS and this is in my fonts folder:

abyssinica
dejavu
droid
fonts-beng-extra
fonts-deva-extra
fonts-gujr-extra
fonts-guru-extra
fonts-kalapi
fonts-orya-extra
fonts-telu-extra
fonts-yrsa-rasa
freefont
Gargi
Gubbi
hack
kacst
kacst-one
lao
liberation
liberation2
lohit-assamese
lohit-bengali
lohit-devanagari
lohit-gujarati
lohit-kannada
lohit-malayalam
lohit-oriya
lohit-punjabi
lohit-tamil
lohit-tamil-classical
lohit-telugu
malayalam
Nakula
Navilu
noto
openoffice
padauk
pagul
Sahadeva
samyak
samyak-fonts
Sarai
sinhala
tibetan-machine
tlwg
ttf-khmeros-core
ubuntu

I can't tell you for other distros but I hope it helps anyway.

3
  • Thanks. That looks pretty much identical with my VERSION="18.04.1 LTS (Bionic Beaver)" distro, which is working fine. I had an earlier` WSL Ubuntu 18` that was working fine also. But I had to reinstall Windows, and now every WSL Ubuntu that I install seems to have only dejavu. I wonder if microsoft changed it and stopped distributing fonts with their WSL Ubuntu distros. How to find out? – Daniel Goldfarb Sep 3 '20 at 21:33
  • 1
    There doesn't seem to be anything about that in the release notes: docs.microsoft.com/en-us/windows/wsl/release-notes . But perhaps the difference is between WSL and WSL 2. – totalynotanoob Sep 3 '20 at 21:37
  • It doesn't appear to be WSL vs WSL2 related. The problem first appeared when I upgraded to WSL2 and deleted and reinstalled Ubuntu. But I have since clean reinstalled windows and went back to plain WSL and still have the problem. I now know the problem is missing fonts. Just trying to figure out if I can track down why. – Daniel Goldfarb Sep 3 '20 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.