1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
How to set up your Debian box for Thai language.
================================================
This base package (thai-system) should install a couple of packages that
are needed for Thai desktop. Nowadays, X11 is the only convenient means
to use Thai language on Debian GNU/Linux system. In recent development
of XFree 4.1.x, using Thai with X11 is easier than ever before. People
at linux.thai.net have been working a lot on Thai support for X11 on
GNU/Linux. Standards are being written and adopted.
Here is a short HOWTO in setting up Thai X11 desktop on your Debian box:-
1. Config your glibc locale.
Add "th_TH TIS-620" to your /etc/locale.gen. Then run
$locale-gen.
With the recent locales package, uou should use
$dpkg-reconfiure locales
to configure your locale option instead. If you don't configure thai
locale, Thai xkb keyboard support under X will not function.
2. Config your X for Thai font path.
xfonts-thai contains some thai fonts in ordinary X11 default font path,
so there is no need to reconfig this by hand. If you would like to use
Thai TrueType font (such as from xfonts-thai-ttf package), or other
TrueType font, you should add
Section "Files"
FontPath "/usr/lib/X11/fonts/TrueType"
EndSection
Section "Module"
Load "freetype"
EndSection
to your /etc/X11/XF86Config-4 outside #DEBCONF section.
3. Config your X for Thai keyboard.
You can :-
1. Add the following to /etc/X11/XF86Config-4,
Section "InputDevice"
Identifier "Thai Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbKeymap" "xfree86(th)"
Option "XkbModel" "pc104"
Option "XkbLayout" "th"
EndSection
and configure your X to use "Thai Keyboard" as your "InputDevice" in
the "ServerLayout" section. man XFree86Config-4, nonlock for more info.
2. Run "setxkbmap th" from an x-terminal-emulator after you have
started X Package xbase-clients is needed.
3. If you are using KDE, use kcontrol set Thai keyboard in
Peripherals/Keyboard.
4. Use "xkbsel -s th", from package xkbsel, to set the keyboard map.
In order to use thai keyboard, environment variable LANG have to be set
to either th_TH or th_TH.TIS-620, before calling of any application.
Examples,
$LANG=th_TH mozilla
will launch mozilla using Thai locale.
KDE (application) has its own method of setting this variable. Setting
KDE language to Thai will allow the usage of Thai keyboard in all KDE
application.
4. Set up Thai TrueType font for X.
1. I recommend putting TrueType fonts in /usr/X11R6/lib/X11/fonts/TrueType.
2. In /usr/X11R6/lib/X11/fonts/TrueType,
$ttmkfdir > fonts.scale
$mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings -e /usr/X11R6/lib/X11/fonts/encodings/large
3. Check TrueType font path and freetype support in your /etc/X11/XF86Config-4.
"Files" and "Module" section should look like,
Section "Files"
...
FontPath "/usr/lib/X11/fonts/TrueType"
...
EndSection
Section "Module"
...
Load "freetype"
...
EndSection
4.You may use xfs (X font server from package xfs) instead.
Just add "/usr/lib/X11/fonts/TrueType" to the catalogue line
in your /etc/X11/fs/config and add the following to your
/etc/X11/XF86Config-4.
Section "Files"
...
FontPath "unix/:7100"
...
EndSection
5. Set up Anti-Aliasing Thai TrueType/Type1 font for recent qt/kde, gtk.
Just add,
dir "/usr/X11R6/lib/X11/fonts/TrueType"
at the top of your /etc/X11/XftConfig. Things should be set.
6. Sit back and enjoy.
Chanop Silpa-Anan <chanop@debian.org>, 12 December 2001.
|