94

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.

user391339
  • 1,479
  • 2
  • 13
  • 19
  • 2
    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
    Try this: [How to locate a font in Ubuntu?](http://askubuntu.com/questions/353307/how-to-locate-a-font-in-ubuntu), [How to install fonts fast and easy?](http://askubuntu.com/questions/191778/how-to-install-fonts-fast-and-easy) and [How do I install fonts?](http://askubuntu.com/questions/3697/how-do-i-install-fonts) – Lety Nov 29 '14 at 22:12

4 Answers4

116

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

d a i s y
  • 5,411
  • 9
  • 41
  • 59
Michal Przybylowicz
  • 3,502
  • 4
  • 30
  • 28
13

if you need to get the font family name:

fc-list : family | sort | uniq

Savrige
  • 233
  • 2
  • 6
4

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/

Alexander C
  • 231
  • 2
  • 3
4

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.

grantbow
  • 976
  • 11
  • 27