Setting up Malayalam Fonts and Keyboard for GNU/Linux (RedHat 9) There are two font subsystems in X windows, The 15 years old core X font subsystem/xfs and the new fontconfig subsystem. xfs renders fonts in non anti-aliased fashion, where as fontconfig renders fonts with antialiasing. Over the time fontconfig is expected to replace xfs. At present appplications using the Qt 3 or GTK 2 (which includes GNOME and KDE) uses the fontconfig; most of the other apps uses xfs.
Note: OpenOffice uses it's own font rendering technology and there is some difference in Mozilla also.As we are not sure which application is using which font sub system, it may be better to add fonts into both subsystem.
To get a list of all installed fonts
$ xlsfonts
First of all you need Malayalam fonts.
You may download the fonts from SMC project website http://savannah.nongnu.org/files/?group=smc or from http://www.keralaindustry.org/malayalam website. Download comes as a gzipped tar ball, so unzip and untar.
$ tar -zxvf free-mal-fonts.tar.gz
where 'free-mal-fonts.tar.gz' is the downloaded malayalam font file name
Create a directory and move all font files to that directory (/usr/share/fonts/malayalam ). Change to the new directory
$ cd /usr/share/fonts/malayalam/
To add fonts into xfs
create index of scalable font files for X
$ mkfontscale
this command should create new file in that directory, namely 'fonts.scale' and the contents may look something similar as follows
AkrutiMal2Bold.ttf -misc-AkrutiMal2-bold-r-normal--0-0-0-0-p-0-iso10646-1
AkrutiMal2Normal.ttf -misc-AkrutiMal2-medium-r-normal--0-0-0-0-p-0-iso10646-1
mal1-b.ttf -misc-AkrutiMal1-bold-r-normal--0-0-0-0-p-0-iso10646-1
mal1-n.ttf -misc-AkrutiMal1-medium-r-normal--0-0-0-0-p-0-iso10646-1
mal2-b.ttf -misc-AkrutiMal2-bold-r-normal--0-0-0-0-p-0-iso10646-1
mal2-n.ttf -misc-AkrutiMal2-medium-r-normal--0-0-0-0-p-0-iso10646-1
malayalam.ttf -misc-malayalam-medium-r-normal--0-0-0-0-p-0-iso10646-1
MalOtf.ttf -misc-MalOtf-medium-r-normal--0-0-0-0-p-0-iso10646-1
nonstd-ml-01.ttf -misc-Tulasi-medium-r-normal--0-0-0-0-p-0-iso10646-1
nonstd-ml-02.ttf -misc-Thoolika-medium-r-normal--0-0-0-0-p-0-iso10646-1
nonstd-ml-03.ttf -misc-Matweb-medium-r-normal--0-0-0-0-p-0-iso10646-1
nonstd-ml-04.ttf -misc-Manorama-medium-r-normal--0-0-0-0-p-0-iso10646-1
nonstd-ml-05.ttf -misc-ML TTKarthika-medium-r-normal--0-0-0-0-p-0-iso10646-1
nonstd-ml-06.ttf -misc-Shree Mal 0502-medium-r-normal--0-0-0-0-p-0-iso10646-1
use mkfontdir to create an index of X font files in a directory
Because scalable font files do not usually include the X font name, the file "fonts.scale" can be used to name the scalable fonts in the directory. The fonts listed in it are copied to fonts.dir by mkfontdir. "fonts.scale" has the same format as the "fonts.dir" file.
$ mkfontdir
Add the new directory to xfs path
$ chkfontpath --add /usr/share/fonts/malayalam
update the new font information
$ ttmkfdir -d /usr/share/fonts/malayalam -o /usr/share/fonts/malayalam/fonts.scale
Reload the xfs font server as follows
$ service xfs reload
To add fonts into fontconfig is very easy. use the following command.
$ fc-cache /usr/share/fonts/malayalam
To configure fonts only for your id, create a directory namely ~/.fonts/
$ fc-cache ~/.fonts/
Or you may use Nautilus to do this
$ nautilus
then in the address bar enter fonts:/// then drag and drop required fonts
Setting up fonts for applications based on GTK+1.2, this part may be required create/modify .gtkrc.mine file in your home directory as follows.
style "user-font" {
font-set ="-misc-MalOtf-medium-r-normal--0-0-0-0-p-0-iso10646-1" }
widget_class "*" style "user-font"
I am not sure what exactly the use of this, if someone knows the details, please update
Setting up Malayalam keyboard in KDE
Open KDE control center form start up menu, go to regional&accessibilty select keyboard then select malayalam from the list, do NOT remove english. Save settings. After saving the settings you should see a small icon in regith side of the taskbar near to your clock, click that icon, it ll toggle your keyboard to english/malayalam.
All right, your Malayalam keyboard is ready to use, open an application, say 'konsole' KDE terminal application or gedit start typing, you should be able to type Malayalam or English based on your keyboard settings. If you want to input malayalam chars in openOffice, then select fonts like Malayalam or MalOtf (only these two fonts works for me) and start typing. ' ?????' .
Here is the Malayalam Keyboard Guide ( മലയാളം കീേബാ൪ഡ് സഹായി )
Need to write about different ways to setup keyboard in GNOME, etc,etc. Will update sooner
xset - user preference utility for X
To restore the default font path:
fp default
To have the server reread font databases:
fp rehash
To remove elements from font path:
-fp path[,path...] fp- path[,path...]
To prepend or append elements to font path:
+fp path[,path...] fp+ path[,path...]
(C)
Swathantra Malayalam Computing & Suresh VP.
Trademarks
are owned by
their owners.
Permission is granted to copy, distribute and/or modify this document
under
the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software
Foundation;
A copy of the license is located at www.gnu.org/copyleft/fdl.html, in
the
section entitled "GNU Free Documentation License".
The information given in this document is believed to be correct, the
author
will accept no liability for the content of this document.
Use this document at your own risk.
|