Installing Fonts in Linux
If you do much desktop publishing or graphics work in Linux than you might be at a place where you are struggling to get fonts installed. Well never fear - it's not nearly as difficult as it sounds. In fact, installing fonts in Linux is quite easy. Of course the easiest means to installing fonts in Linux is with the command line. In this article you are going to learn how to install true type fonts both per user and globally.
Naturally one of the issues with fonts is where to get them. If you do a search for "free fonts" you will come up with plenty of sites that offer fonts. There are even sites that sell fonts for a reasonable price. Of course if you are serious about desktop publishing or graphics you will want to look at higher quality fonts. On with the installation.
Per User Installation
By far the easiest installation is the per user installation. What this type of install does is install the fonts in such a way that only the targeted use has access to the fonts. For this type of installation download all of your fonts into a directory the user has access to (the ~/Downloads directory works fine.) Once you have your fonts collected (You will most likely have to unzip each file which will result in either .ttf or .TTF files) do the following (all in a terminal window) within the directory containing your downloaded fonts.
mv *ttf *TTF ~/.fonts
Now log out of your desktop environment and log back in. Those fonts should now be available to you. If you're unsure you can fire up either OpenOffice or The GIMP to see if your fonts are available. They should be.
Installing fonts globally allows all users access to the fonts. This is not as simple as installing per-user but it is still simple. You sill have to download all of your fonts. Once you have them downloaded unzip the files (making sure all the *ttf and *TTF files are in the same directory) and su to the root user. Once you are the root user issue the following commands:
- mkdir Â -p /usr/local/share/fonts/ttfonts
- mv *ttf *TTF /usr/local/share/fonts/ttfonts
- cd Â /usr/local/share/fonts/ttfonts
- ttmkfdir Â -o fonts.scale
- chkfontpath Â --add /usr/local/share/fonts/ttfonts
- /etc/rc.d/init.d/xfs Â restart
Now log out of your desktop and you can log in as any user and the fonts will be available to them.
See, installing fonts in Linux isn't difficult - especially when installing on a per user basis. For most people the first method will suffice. Unless you work on a machine that is used by more than one user, you will only need the per user method. Of course if the global installation method is a bit daunting you can always copy the fonts into the ~/.fonts directory of every user that needs access to the various true type fonts.Advertisement