Nextpertise a journal of interesting technical ideas . . .

Fonts on Linux

by Brent Stewart on Wednesday, Sep 9, 2020

I’m a little bit of a font nerd. In the early 90s, someone who knew computers and had a laser printer had an easy opportunity to get into graphic design. I knew computers and the college had a laser printer, so I got a copy of Looking Good in Print and dabbled. I’ve written about this earlier in describing my love of Postscript.

If you’d like to have some font options on Linux, there are some great places to get high-quality fonts that work well with Linux applications. This is a minor, but hopefully useful tip!

Formats

Most Linux desktop environments support a variety of formats, but the most common are PostScript, OpenType, and TrueType.

Postscript is the oldest of the three. Developed by Adobe in the 1984, they found a home on the Apple LaserWriter and were the way to print high quality fonts. They were expensive to license though, so Microsoft and Apple developed TrueType which was a similar vector-based approach to font description. TrueType added in the idea of “hinting” which offered more control over how glyphs were presented. OpenType is the evolution of TrueType and allows more complex descriptions of shapes and larger character sets (up to 64K).

All three formats work in Linux. Unless you are very detail oriented, I doubt you’ll be able to tell which font is TrueType and which is OpenType. There are a a lot of TrueType fonts available, but I use OpenType if I have a choice.

Using Apt

One way to get fonts is to use the archive for your distribution. For Ubuntu, there are a variety of fonts available via PPA. To list and install them use:

apt search font
sudo apt install fonts-noto

Noto is a Google font that is clean and available in a range of type faces.

This is an easy way to install new fonts, but there’s no preview and this approach may require some effort.

From the Web

Google Fonts Option #2 is to search for fonts online. One great place to get (free!) quality fonts is from Google. Fonts can be previewed online and are easy to download. Google passes these to you as TrueType (TTF) files in a Zip. Unzip the file and copy the files to /usr/share/fonts. The fc-cache command rebuilds the font cache to include the new files and they should be available in programs afterward.

unzip font.zip
sudo cp *ttf /usr/share/fonts/truetype
sudo fc-cache -f -v

The fonts directory has a set of sub-directories (including postscript, truetype, and openscript) so change the target directory appropriately. If you downloaded a group of fonts that are sorted into sub-directories, you can grab all the ttf files recursively using sudo cp *ttf /usr/share/fonts/truetype -r.

This font directory (/usr/share/fonts) makes fonts available to all users. If you want to install them for just one account, you can install them to ~/.fonts. I’ve never done it that way, since I control my system, but this would be particularly useful if you don’t have root privileges.

The Google site is a great resource, but there are many places to purchase or get open-source fonts online. Hope this helps!



References:
  https://fonts.google.com
  
https://www.google.com/get/noto/

Recent articles related to these tags:
linux
Share this article:   
Tweet