This is a rough draft of what will be a tutorial about Chinese display and input for Slackware-12.0:
HOW-TO setup Chinese font display and input in Slackware-12.0
This HOW-TO explains how to make Slackware-12.0 display good looking Chinese
fonts, both normal and bold; sharp, clear English fonts; and Chinese input.
All files and packages necessary for this HOW-TO can be downloaded from:
===INSTRUCTIONS FOR CHINESE FONTS===
NB: Follow these steps in this order ...
1. Create a file named "10-myfonts.conf" under "/etc/fonts/conf.avail/".
This is the fontconfig configuration file for your new font setup.
Rather than creating a new file on your system, you can cp 10-myfonts.conf
to "/etc/fonts/conf.avail/" then you need to symlink it to "/etc/fonts/conf.d/"
which you can do with this command as root:
ln -s /etc/fonts/conf.avail/10-myfonts.conf /etc/fonts/conf.d/
2. You will need some fonts with proper glyphs for good display. The best ones come
from Microsoft. Eric Hameleer's has setup a corefonts.SlackBuild
which you can use
to get and install these fonts. In this HOW-TO we will use Tahoma as the choice for
the English font. If you prefer a different font, try what's available on your system.
For this HOW-TO you will need SimSun.ttf for Chinese fonts.
3. Copy the needed fonts to "/usr/share/fonts/TTF/". Then change the permissions by
issuing "chmod 644 /usr/share/fonts/TTF/*ttf". Next you'll need to run the following
commands as root in the "/usr/share/fonts/TTF/" directory:
4. Mount your "slackware-12.0-install-d3.iso" or the DVD. There are two packages in
"kdei" we need to install. If "/mnt/cdrom/" is your mount point, issue as root:
That should install kde-i18n-zh_CN and koffice-l10n-zh_CN.
(If you're interested, I also have a Chinese build of Open Office available that
works great for Chinese and English. The latest stable Chinese source was 2.1.1,
and there's also an English OOo package with the 2.3.0 source. Email me for them.)
5. Next we need new Slackware packages for "freetype and libXft".
Pat V. rebuilt the libXft package and put it in Slackware -current for testing, so
you can download it from here
or your local mirror, and install it with the command:
6. We need to rebuild freetype with the bytecode interpreter enabled. Here are the steps:
From the Slackware source (../slackware-12.0/source/l/freetype/) get all those
files and put them in one directory. Then you can edit "freetype.SlackBuild" and
uncomment (remove the # from in front of) line 50:
#zcat $CWD/freetype.bytecode.interpreter.diff.gz | patch -p1 --verbose || exit 1
and also uncomment line 57:
#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
and also give it a different version number in line 7, where the file says:
give it another number, such as 4. Now save the file and run as root:
sh freetype.SlackBuild --cleanup
which will build a new freetype package with the bytecode interpreter enabled, and sub-pixel
hinting. (Latest testing shows the stock FreeType package might be okay after installing the
new libXft, so try that before
you rebuild FreeType.)
You can get the latest source
and rebuild FreeType yourself if you prefer, but IMO a
Slackware package built with an official Slackware SlackBuild script is best; so
even if you elect to use the latest freetype source, use the Slackware SlackBuild.
After it's built, you can look in /tmp/ for the new Slackpackage and install it as
usual, but use
rather than installpkg.
7. For Chinese input, you will need scim, scim-tables, and scim-pinyin. You can either
build them yourself, download them from http://www.slackware.com/~alien/sas/
build them using the SlackBuilds from that repository. These are new packages for
Slackware, so you can install them all using "installpkg <packagename>".
8. Now we need to setup the language selections. Edit "/etc/profile.d/lang.sh" like this:
# en_US is the Slackware default locale:
# export LANG=en_US
9. Reboot ... and configure your system.
10. Open the KDE control center, and select Appearance & Themes > Fonts
Choose "Adjust All Fonts" and under "Requested Font" put a check mark in Font and
then choose "Tahoma". Select OK and then change "Use anti-aliasing" to Disabled,
then change "Force fonts DPI" to "96 DPI". Select "Apply" then from the File menu
select Quit. Now shutdown your X server, and then issue "startx" again.
11. For Konsole I selected "Lucida Console, regular, 10". Choose one that you like.
12. For System-wide configuration of Gtk apps, add a file named "gtkrc" to /etc/gtk-2.0/
with this text:
gtk-font-name = "Tahoma 9"
If you only want to do this for one user, add the file .gtkrc-2.0 to /home/<user>/
and put the text in it. In theory, you could change the Gtk font for each user on
the system. You may select another font if you don't like Tahoma.
13. For web browsing we choose Mozilla Firefox. It's fonts need to be changed, so open
Firefox and choose "Edit > Preferences > Content" and in "Fonts & Colors" choose
"Advanced" and select some fonts. I have:
Fonts for: Simplified Chinese
Proportional: Sans-serif Size: 12
Proportional: Tahoma Size: 12
Minimum font size: 12
Allow pages to choose their own fonts, instead of my selections above (remove the check mark)
Default Character Encoding: Chinese Simplified (GB2312)
You should how have sharp looking Chinese fonts - able to display bold, also. The
English fonts should also look good. You might change some of my font selections to
suit your taste.
The app SCIM (Smart Common Input Method) is started when you boot your computer. You
only need to press "Ctrl+Space" to switch from English to Chinese input. There is a SCIM
setup menu you can read by right-clicking on the SCIM keyboard icon in the system tray.
I've deselected all the languages and input methods except Chinese Simplified. If you can't
read the Chinese to do that, perhaps this screenshot
If you have any questions about this guide, please post them in this thread. If the OP
has an objection to using his thread, we'll edit this post and move the guide.
Once this has a few days to filter through the userbase, I'll write and submit a tutorial
for moderator approval in the Tutorials section
The screenshots included at http://www.slackware.com/~alien/sas/screenshots/
Special thanks to Eric Hameleer's (Alien Bob) and LeiDan for help in getting this far.