Search This Blog

Tuesday, December 21, 2010

How to Install True Type Fonts on Linux

 Steps

   1. Move all your fonts to the ~/ Directory. The ~/ Directory is your home folder. So if you were logged in as boss, the directory would be /home/boss/ .
   2. Open up the terminal. Assuming you've already extracted/copied the  font to the ~/ directory. Type: "cd /usr/local/share/fonts/truetype" without the quotes (the path is "/usr/share/fonts/truetype" on some distros). What this does is changes the directory to the truetype fonts directory.
   3. Type in "sudo mkdir myfonts" also without quotes. Assuming you're not logged in as root, this will ask you for your password.  Just type in your password, press enter, and the directory 'myfonts' will be created.
   4. Type in "cd myfonts" . Then type in "sudo cp ~/*.ttf  ." . These will get your font in the /myfonts directory.
       Run following command the to change the permission of fonts:
     sudo chmod 644 *.ttf
   5. In order to install the font, ownership has to belong to root, so type in "sudo chown root.root *.ttf" and after that "sudo mkfontdir" which makes a directory for your font.
   6. Now your font is installed, but it will disappear the next time system starts up, so you just need to type "cd .." and after that "fc-cache" .

or sudo fc-cache  -f


Every time you install a font after the first time, you can skip step #3.

Source: http://www.wikihow.com/Install-True-Type-Fonts-on-Ubuntu

No comments:

Post a Comment