Installing fonts in Debian with shell commands.

Share your wisdom. Not for support questions!

Moderator: How-to Curator

Installing fonts in Debian with shell commands.

Postby Randicus Draco Albus » December 7th, 2011, 8:11 am

I wrote this very short how-to, because of my own experience and the experience of others who have posted questions on this topic at other fora. The topic discussed here is not font installation in general, but with installing special fonts that are not in repositories. If using KDE's font installer or Gnome's Nautilus, installing special fonts is easy. When using other desktop environments, the easiest, or perhaps only, way is to use the terminal. What follows is an easy way to install fonts on a Debian system.
I do not write full command lines in this document. Instead, I make reference to specific shell commands. This how-to assumes at least a minimal knowledge of shell commands. If the abbreviated commands pose a difficulty, shell command guides are available for down-load at several Linux web-sites. A good one is Linux Command at http://www.linuxcommand.org and bash guides are available at http://www.slackware.com.

Step 1 – Create a directory
Step 2 – Move or copy the directory into /usr/share/fonts.
Step 3 – Set permissions.

Step 1
Create a directory (folder) and place the new founts inside. Give the directory any name your heart desires. The computer will not care. This process is straight-forward, so should not require further elaboration.

Step 2
Now the important part; adding the new directory to your system. Debian stores founts in /usr/share/fonts. This directory contains three sub-directories: truetype, type1 and X11. Do not put the new fonts into any of them. It can screw up the system. Place the new sub-directory in /usr/share/fonts alongside the others.
If using Nautilus, simply invoke gksu nautilus and move or copy as normal.
With the terminal, either move the directory with the mv dir1 dir2 or copy with cp dir1 dir2.
At this point the founts are installed, but not yet useable. The permissions must now be set.

Step 3
If using Nautilus, right click/properties/permissions/etc.
If using the terminal, set the permissions of the new directory with chmod 755. The additions will now be usable. This new directory and its contents are owned by you. Although it is not necessary, if you want the founts to be owned by root, like the ones install with the system, use chmod 644 to set the permissions of each file individually.


Edited by Jheaton5 to correct spelling of font.
Edited on 11 May/05
In the beginning there was only the darkness of the void.
Then Mez said, "Let there be DFN." And it was done.
{After many years.}
Then Mez said, "Let my angels of colour spread the news of my glory afar."
And it is being done.
User avatar
Randicus Draco Albus
 
Posts: 515
Joined: September 22nd, 2011, 1:22 pm
Location: Sitting in front of my computer.

Return to HowTo

Who is online

Users browsing this forum: No registered users and 1 guest

x