How to install TTF Fonts on Fedora

  1. 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.
  2. Login as ‘root’ (or equiv thru su or sudo).
  3. 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!!!
  4. Ensure that script is executable
    # cd /home/extras/fonts/TTF
    # chmod 744 install.sh
  5. Execute the script
    # ./install.sh
  6. 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

Leave a Reply

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

css.php