Installing TrueType Fonts
To install TrueType on a gnome system, follow these steps:
- Create a ~/.fonts directory.
- Copy the TrueType files to your ~/.fonts directory.
- Verify that the fonts are available to your system with the fc-list command.
Microsoft's TrueType core fonts for Linux are available at this link.
To enable fonts for all users, use the following method:
1. Become the root user.su -2. Create the TrueType font directory. The TrueType font directory must have 755 permissions.
mkdir -m 755 /usr/X11R6/lib/X11/fonts/TrueType3. Copy all your TrueType fonts (ending in extension .ttf or .TTF) to /usr/X11R6/lib/X11/fonts/TrueType
4. Make sure that all font file names are lowercase and contain no spaces. To convert your uppercase files to lowercase, you may use one of these methods:
Method 1:
#cd /usr/X11R6/lib/X11/fonts/TrueType
for i in *
do
j=`echo $i | awk '{print tolower($0)}'`
mv $i $j
done
Method 2:
cd /usr/X11R6/lib/X11/fonts/TrueType
for uppercase in `ls`
do
for lowercase in `ls $uppercase|tr [A-Z] [a-z]`
do
mv $uppercase $lowercase 2>/dev/null
done
done
5. Make sure all font files have 644 permissions.
chmod 644 *.ttf
6. ttmkfdir > fonts.scale
7. mkfontdir
8. Add your TrueType font directory to the xfs configuration file /etc/X11/fs/config.
/usr/sbin/chkfontpath --add `pwd`
9. xset fp rehash
10. service xfs restart
11. Restart the X Window System in order for the new fonts to take effect.
Last Updated on Tuesday, 02 December 2008 15:34
Comments (2)
Add your comment
yvComment v.1.24.0
Installation for all users
Fonts installed by this method will be accessible to all users of the system.
1. Copy fonts to be installed in /usr/share/fonts (create a subdirectory in the directory to store the .ttf files)
2. Type: fc-cache-fv
Installation for a single user
Fonts installed will be accessible by a single user. (This manipulation can be done without admin rights. Each user can have its own fonts.)
1. Copy fonts to be installed in ~/.Fonts
2. Type: fc-cache-fv