- This HOWTO assume that you have TTF fonts collection in a directory
/home/extras/fonts/TTF
. Change the script below, if you use a different location. - Login as ‘root’ (or equiv thru su or sudo).
- Copy the script below and save to file
/home/extras/fonts/TTF/install.sh
:
#!/bin/tcsh
echo ------------------------------------------------------------
echo Installing true type fonts
echo ------------------------------------------------------------
pushd /usr/share/fonts
echo Creating directory /usr/share/fonts/TTF ...
mkdir TTF
echo Copying true type fonts
cd TTF
cp /home/extras/fonts/TTF/*.ttf .
umask
echo Creating fonts.scale file ...
ttmkfdir
echo Creating index of scalable font files
mkfontdir
echo Adding /usr/share/fonts/TTF to font server path ...
chkfontpath -a /usr/share/fonts/TTF
echo Building font information cache files ...
fc-cache
popd
echo Done!!! - Ensure that script is executable
# cd /home/extras/fonts/TTF
# chmod 744 install.sh
- Execute the script
# ./install.sh
- You should be able to use the TTF fonts now.
This script can be run each time new fonts are added to your collection.
Source: FedoraForum.org