Web Projects Outsourcing

True type fonts in Linux

Installing true type fonts for system-wide use in Gnome, KDE, etc.:

Become root:

su -

As root, create the fonts directory:

mkdir /usr/share/fonts/ttf

Copy the font files in, cd into the fonts directory:

cp [fontfiles] /usr/share/fonts/ttf
cd /usr/share/fonts/ttf

Make fonts.dir:

ttmkfdir -c

Copy fonts.dir to fonts.scale:

cp fonts.scale fonts.dir

Add the font path:

/usr/sbin/chkfontpath -q --add /usr/share/fonts/ttf

Now update the font-config cache:

fc-cache -f -v

To add new true type fonts in the future, just run:

/usr/sbin/chkfontpath -q --remove /usr/share/fonts/ttf
cp [fontfiles] /usr/share/fonts/ttf
cd /usr/share/fonts/ttf
ttmkfdir -c
cp fonts.scale fonts.dir
fc-cache -f -v
/usr/sbin/chkfontpath -q --add /usr/share/fonts/ttf

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.