Ok, so you
- downloaded some .tar archives that (should) contain font files (.ttf or something)
- you want to unarchive the .tar files and
- be able to use the fonts
There might be some differencies on making the fonts work, but here's a start; try out if it works:
1) Let's unarchive the tar files; first let's create a directory called
fonts under your home directory, then unarchive the tar files there (edit the below code; instead of
/path/to/tar/file.tar write the full path to a tar file)
Code:
cd
mkdir fonts
cd fonts
tar -xvf /path/to/tar/file.tar
Now you should have the contents of
file.tar in
~/fonts/. Repeat the last step (tar-command) for every tar archive you want to.
2) Now that we have the font files, we need to put them in a correct place where the system can find them; since this probably needs root privileges to be done, let's first become root and then find out the path where the other fonts are:
Code:
su
(now type your root password; note that nothing is printed on screen while typing)
grep FontPath /etc/X11/xorg.conf
If you're using XFree86 instead of Xorg (some distributions do, some don't), you'll need to put
/etc/X11/XF86Config-4 instead of
/etc/X11/xorg.conf, and possibly do this another way around, but these advices work for Xorg and if you need advices for XFree86 or something else, just ask).
Now from the above
grep command (which will match a file's contents against a given pattern and by default print only those lines that contain the pattern) you should have received some lines like these (an example):
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
That tells where your fonts are (in the above example: under
/usr/X11R6/lib/X11/fonts/).
3) Now let's put the fonts there; use the same terminal as in the previous code example, and be root (if you closed the terminal, use
su again first).
If the unarchived tar files contained directories that contain the fonts, copy the directories; if the tar files contained font files only (no directories), then do this first (otherwise skip this code):
Code:
mkdir /usr/X11R6/lib/X11/fonts/MyFonts
Again, replace
/usr/X11R6/lib/X11/fonts/MyFonts with the font path you got from the previous grep command, plus some directory name for your new fonts.
4) Then let's copy the font files there:
Code:
cp ~/fonts/* /usr/X11R6/lib/X11/fonts/MyFonts/
..and again remember to alter the last path to point to
your font directory.
5) Now all we have to do is alter the configuration file of X, add there a new line that tells X where the new fonts are, save and restart X to get them work:
Code:
pico /etc/X11/xorg.conf
instead of
pico you may use whatever text editor you like; for example
vi,
joe,
gedit,
kate,
emacs,
bluefish, ... Now when you have the file open, search the
FontPath lines you saw above with the
grep command. Them simply duplicate the last line (copy&paste or just write) and alter the copied line to point to the directory you entered (in my example it was
/usr/X11R6/lib/X11/fonts/MyFonts/).
6) Save the file and then close it. Restart X by pressing
CTRL+ALT+BACKSPACE and your new fonts should work; you may also use a console login to do
which in most systems should result in first closing X server (jumping to runlevel 3; it should be a text-runlevel for this to work) and then re-starting it (jumping to runlevel 5; it should be a graphical runlevel for this to work).
So, to cut short: first unarchive tar files (tar -xvf
filename.tar), then make a new directory to the same place where all the other fonts are in your system (should read in X's configuration file), copy the font
files there, alter X's configuration file and restart X server.