Install TTF Fonts from command line

From Bitbull Wiki
Jump to navigation Jump to search

this is a short way to add a huge amount of fonts to a linux system.
tested on ubuntu 10.04

1 where are the fonts?

egrep '<dir>.*</dir>' /etc/fonts/fonts.conf 
	<dir>/usr/share/fonts</dir>
	<dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/usr/local/share/fonts</dir>
	<dir>~/.fonts</dir>

we use the /usr/local/share/fonts dir. its the best place for private fonts

2 copy all your fonts into one directory

mkdir /tmp/myfonts
cp all_my_fonts.ttf /tmp/myfonts/

3 copy the fonts into the system

sudo mkdir -p /usr/share/fonts/myfonts
sudo cp -r /tmp/myfonts/* /usr/share/fonts/myfonts/

4 activate the fonts

sudo fc-cache -f -v | grep myfonts

its done!

5 Links

http://www.dafont.com/theme.php?cat=711&fpp=50