34

There are many questions and answers regarding fonts on Ubuntu, but not so many dealing with Ubuntu for Embedded Linux, such as Beaglebone Black.

I have not been able to locate any .ttf files in standard locations on my system, and I think that given the resource constraints these have been omitted.

Using the command line, how can I (1) find out which fonts are installed, and (2) install more fonts.

FYI: I am looking for a simple sans-serif ttf that I can use to display text on an 8x8 LED matrix.

  • 1
    Have you tried /usr/share/fonts? A very basic way to list fonts is fc-list. – Wilf Nov 23 '14 at 20:08
  • /usr/share/fonts isn't there. fc-list command is not found. so far I just downloaded a free arial font from www.dafont.com and used secure copy to transfer it to my beaglebone. i will create a /usr/share/fonts/ directory manually for future use. scp /Users/me/Downloads/pixel_arial_11/PIXEARG_.TTF ubuntu@192.168.7.2:/home/ubuntu/ – user391339 Nov 23 '14 at 20:14
  • 2
41

The best and simplest way is to use console command (this command should be available for all ubuntu-based distributions) :

fc-list

Example output (stripped) :

/usr/share/fonts/truetype/lato/Lato-Medium.ttf: Lato,Lato Medium:style=Medium,Regular
/usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf: Tlwg Typo:style=Bold
/usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf: Lato,Lato Semibold:style=Semibold Italic,Italic
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/noto/NotoSansThai-Regular.ttf: Noto Sans Thai:style=Regular
...

From MAN :

fc-list - list available fonts

To check all available options use MAN (manual): man fc-list

2

What version of Ubuntu are you using?

(1) Thanks to the links from Lety, on my ubuntu 15.04 machine less /etc/fonts/fonts.conf. In there it describes how to use local.conf.

(2) from a command line, to search for more fonts I use apt-cache search font | grep lcd then I use apt-cache show {} (replacing {} with the package name) for a more detailed description. installation from the command line has several variants (like aptitude) but good old sudo apt-get install {} works well.

0

Answer for 2nd question:

Installing font is just copying its file to some folder. There can be many folders. At my system they are:

  • /usr/share/fonts/ — fonts for all users
  • ~/.local/share/fonts/ - fonts for particular user

There can be any subfolders you want.

Here is the command to get list of font files that your system uses.

fc-list -f '%{file}\n' | sort

Look at it and you'll get the idea of where fonts in your system located/

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.