Debian – Easily install a font per language who haven’t any yet, on Debian 10

debianfonts

Listening to a khmer song on the Internet, I saw that khmer Unicode characters were replaced by squares in my french Debian installation. Collecting what else was missing, it was also thaï, nepali… plenty of languages that are not displayed properly.

I am a bit jealous with Windows here. How can I install easily all the missing fonts my O.S. lacks to be able to display any page in the world on Firefox with it's due characters ?


Three questions inside this post :

  1. How can I detect all the language "Locale codes" that are lacking a font ?
    en, kh, kr, id, jp… automatically. All the missing ones.

  2. How to install their proper fonts.
    If there is a best font for each language, where is the list of the best font per language ?

  3. Does anyone wrote in the Debian community a script of apt-get install font.. script with all the fonts needed to ensure that it is able to display a text in any language, like Windows can ?

That summarizes in : "How can I get quickly a browser able to display a text in any language" easily ? Just that basic and classical Windows feature ?

Best Answer

You just need to install fonts with character coverage for those scripts. The are two approaches you can take:

  • Install fonts specifically targeting the languages you're interested in. Debian has collected a bunch of these into task-«language»*. So, e.g., task-khmer-desktop recommends fonts-khmeros, so that's a good font to install to get Khmer text to display. Similarly, task-nepali-desktop recommends fonts-lohit-deva.

  • Install fonts targeting global coverage. The fonts-noto is one such package. There is also ttf-unifont (and the bitmap unifont its made from), but that's much lower quality.

There are also some other fonts you might be interested in (e.g., fonts-ancient-scripts, fonts-lg-aboriginal). And honestly the output of apt-cache search ^fonts-sil.

Related Question