Friday 14 October 2011

How to install TTF/OTF fonts in linux


Following is the procedure to install 'OTF/TTF' fonts in Linux (eg:Fedora Core 3)

* Step 01. Download any otf/ttf font from internet and save in a directory on
your machine.

* Step 02. Go to the directory in which you have saved the font file.

* Step 03. Login as root.

  $su

* Step 04. Create a directory /usr/share/fonts/default/TrueType using following
command.
$ mkdir /usr/share/fonts/default/TrueType

* Step 05. Copy the font file in /usr/share/fonts/otfonts/
$ cp *.ttf /usr/share/fonts/default/TrueType

* Step 06. Go to directory /usr/share/fonts/default/TrueType
$ cd /usr/share/fonts/default/TrueType

* Step 07. Create fonts.scale
$ ttmkfdir
or
$ /usr/sbin/ttmkfdir

* Step 08. Create fonts.dir
$ mkfontdir

* Step 09. Add the path to X Font serve path
$ chkfontpath --add /usr/share/fonts/default/TrueType
or
$ /usr/sbin/chkfontpath --add /usr/share/fonts/default/TrueType

* Step 10. Update font information cache
$ fc-cache

* Step 11. Logout as root
$ exit

No comments:

Post a Comment