Install and configure Hindi fonts in Linux
It’s a short howto to install True Type Fonts in Linux. In this particular case, I want to install Hindi fonts in my CentOS 5.0 box.
Step 1. Download Hindi (.ttf) fonts from Internet. One location to find: http://tdil.mit.gov.in/download/openfonts.htm
Step 2. If you downloaded zip/tar, extract it in a directory where you want to store the fonts, for example: /usr/share/fonts/hindifonts
# mkdir -p /usr/share/fonts/hindifonts
# cd /usr/share/fonts/hindifonts
–> download the tar/zip file from net. here just the example
# unzip examplehindifonts.zip
# rm examplehindifonts.zip
Step 3. Make sure the all files (fonts) names are in lower case. If you found mixed case or not sure, run this command:
# for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr ‘[A-Z]‘ ‘[a-z]‘`; done;
Step 4. Edit xfs config file so that system can find the fonts stored in our directory:
# vi /etc/X11/fs/config
–> Add a new line, you can see the bold line added here for directory created above–
catalogue = /usr/share/X11/fonts/misc:unscaled,
/usr/share/X11/fonts/75dpi:unscaled,
/usr/share/X11/fonts/100dpi:unscaled,
/usr/share/X11/fonts/Type1,
/usr/share/X11/fonts/TTF,
/usr/share/fonts/default/Type1,
/usr/local/share/fonts/hindifonts,
–
Step 5. Set the directory as font container:
# ttmkfdir -o fonts.scale
# mkfontdir
# fc-cache
Step 6. Restart you xfs server or X-Windows to make these changes effective.
# /etc/init.d/xfs restart