Sunday, March 18, 2007

Linux Tips - 3

If you have recently started using Linux and ofcourse love your language, often you get frustrated when you can't read your favourite sites in your language. This happens because many of the sites in local languages use ttf fonts instead of new unicode encoding.

I happened to buy a book from www.rasik.com and faced this problem. I couldn't read the Marathi web pages on Rasik site.

Here is what you need to do to enable ttf fonts with your X server.

I am writing this with respect to marathimati.com but this will work for any site that uses ttf fonts (e.g. rasik.com). Note for rasik.com don't use the default procedure given for linux, instead use the procedure given for windows to download the ttf fonts.

1. Download the kiran ttf fonts from here and save them on Desktop.

2. Create a new directory, lets say 'marathifonts' under /usr/share/fonts

# mkdir /usr/share/fonts/marathifonts

3. Copy the ttf fonts to this directory.

# cp kiran.TTF KF-kiran.TTF /usr/share/fonts/marathifonts


5. Run the following command to build the font cache.

# fc-cache -f -v


6. Restart the web browser (Firefox)

7. No need to restart the X font server.

Also note that for the sites that use ttf fonts, you need to change/disable the Character Encoding if it is already set to 'Unicode'. Set it to default 'Western'. Go to View -> Character Encoding -> Western.