Wednesday, December 4, 2013

How to install fonts (.ttf) on CentOS for an individual user

CentOS offical Documents here:http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-x-fonts.html


1.To add fonts system-wide, copy the new fonts into the /usr/share/fonts/ directory. It is a
good idea to create a new subdirectory, such as local/ or similar, to help distinguish between user-installed and default fonts.

To add fonts for an individual user, copy the new fonts into the .fonts/ directory in the user's home directory.

2.Use the fc-cache command to update the font information cache, as in the following example:


fc-cache


In this command, replace with the directory containing the new fonts (either /usr/share/fonts/local/ or /home//.fonts/).

For Example:

I only have a normal user lambert@milliondollarserver.com
To read Chinese from Firefox:


# mkdir ~/.fonts
upload wqy-microhei.ttf to ~/.fonts
# fc-cache ./.fonts


Start Firefox and enjoy.

1 comment:

  1. You are so awesome! I do not suppose I have read a single thing like that before.
    So good to find someone with some genuine thoughts on this subject matter.

    Seriously.. many thanks for starting this up.

    This website is one thing that is needed on the internet, someone with a bit of originality!

    ReplyDelete