How to install fonts for CentOS 7?

30,530

Create a folder in your home directory called .fonts:

mkdir /home/$USER/.fonts

Unzip the files and move them there. Now run the command from your terminal:

fc-cache -v
fc-cache-64 -v

And the font should be available now.

More info, see man fc-cache:

DESCRIPTION
       fc-cache scans the font directories on the system and builds font information cache files for applications  using  fontconfig
       for their font handling.

       If  directory  arguments  are  not  given,  fc-cache uses each directory in the current font configuration. Each directory is
       scanned for font files readable by FreeType. A cache is created which contains properties of each  font  and  the  associated
       filename.  This cache is used to speed up application startup when using the fontconfig library.

       Note that fc-cache must be executed once per architecture to generate font information customized for that architecture.
Share:
30,530
Denny
Author by

Denny

Updated on September 18, 2022

Comments

  • Denny
    Denny almost 2 years

    Just learning, and trying to install a new font into my system.

    So far, I have created a directory "fonts", and unzip "oregon" fonts into this folder. Now the fonts are in /home/denny/fonts.

    How do I move these fonts to /usr/share/fonts? I have also created a new folder "oregon" in this fonts directory. I THINK all my default fonts are in this directory.

    I know I am missing something here.

    Thank you, Denny

    • George Udosen
      George Udosen over 6 years
      it should be .fonts note the ..
    • Denny
      Denny over 6 years
      Can you please show me the steps? Sorry, a Linux newbie here. Thanks again for your time, and sorry for the trouble. -Denny