Next Previous Contents

5. Chinese X Window System

X Window System is a software with powerful environment of graphical user interface under UNIX System. XFree86 is a modified version from MIT X Window System and also freely distributed.

5.1 CXWin

The Chinese X, abbreviated with CXWin, is really a patch of XFree86, making it can show Chinese words under X Window System. Founder of it is srlee. CXWin only support BIG5 code at present, and can let you be possessed of Chinese pop-up menus, of Chinese titles of windows, and of showing Chinese under a variety of window managers and applications.

How to get it?

You can get CXWin 3.3 from this ftp site below:

ftp://linux.cis.nctu.edu.tw/packages/X/Xserver/CXwin/3.3/

If you use XFree86 3.2, you can get the Linux ELF format of version 3.2.

ftp://linux.cis.nctu.edu.tw/packages/chinese/CXwin/binaries/

All you need is to get the corresponding X server. For example, if your video card is matched with XF86_SVGA, just take XF86_SVGA.gz home. XF86_SVGA.gz should work properly on most video cards.

If you system is compatible with rpm, you can get the newest CXWin 3.3.1 of rpm.

ftp://linux.cis.nctu.edu.tw/packages/X/Xserver/CXwin/3.3.1/

Patches

You can get the patches at the same place to compile to binary files by yourself if you've got the sources of XFree86.

Installation

Make sure that you have these shared libraries if your choice is CXWin 3.3 (You can use ldconfig -p for an observation):

libm.so.5 => /lib/libm.so.5.0.6
libdl.so.1 => /lib/libdl.so.1.7.14
libc.so.5 => /lib/libc.so.5.3.12

If your choice is CXWin 3.2, then you need the libc of version 5.2.18 or newer.

First, unzip the compressed files of gzip.

# gzip -d XF86_SVGA.gz
Duplicate the original X server as a copy as the root identification.
# cd /usr/X11R6/bin
# mv XF86_SVGA XF86_SVGA_BACKUP
Put the decompressed CXWin into the exact place and create the decent symbolic link:
# mv /tmp/XF86_SVGA /usr/X11R6/bin
# chown root.bin XF86_SVGA
# chmod 4755 XF86_SVGA
# ln -sf XF86_SVGA X

If your choice is rpm, then everything is more simple and more compact.

# rpm -Uvv XFree86-SVGA-3.3.1-1c.i386.rpm

CXWin needs the following four BIG5 fonts to work normally: taipei15, taipei16, taipeik20 and taipeik24. Install these Chinese fonts in accordance with the method of next section.

5.2 Installation of Chinese fonts

Where to get these fonts?

Maybe you have already installed some Chinese fonts; for GB fonts, you can find them out through the next way:

# xlsfonts | grep gb
-cclib-song-medium-r-normal--0-0-72-72-c-0-gb2312.1980-1
-cclib-song-medium-r-normal--16-160-72-72-c-160-gb2312.1980-1
-isas-fangsong ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
-isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
-isas-song ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
-isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
-isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0
hanzigb13fs
hanzigb13st
hanzigb16fs
hanzigb16st
hanzigb24st
The last five fonts are the previous five ones' aliases. To check the installed BIG5 fonts, using
# xlsfonts | grep big5
-kc-kai-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
-kc-kai-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
-kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
-kc-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
-kc-ming-medium-r-normal-fantizi-15-150-75-75-c-160-big5.eten.3.10-1
-kc-ming-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
-uw-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
-uw-ming-medium-r-normal-fantizi-16-160-75-75-c-160-big5.eten.3.10-1
-uw-ming-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
-uw-songti-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
-uw-songti-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
-uw-songti-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
You can take all of it from this ftp site ftp://ftp.ifcss.org/pub/software/fonts/ if you haven't installed any of them or if you want more of them. The gb/bdf/ amongst them is a GB font while the big5/bdf is a BIG5 font.

Installation of X fonts

Assuming that you have already got a BIG5 font, eb5-24k2.bdf.gz, and a GB font, gb24st.bdf.gz. What you have to do first is that changing them into the format of .pcf.

# gzip -cd eb5-24k2.bdf.gz | bdftopcf -t > eb5-24k2.pcf
# gzip -cd gb24st.bdf.gz | bdftopcf -t > gb24st.pcf
# compress *.pcf
Then install them under /usr/X11R6/lib/X11/fonts/misc
# mv *.pcf.Z /usr/X11R6/lib/X11/fonts/misc/
# cd /usr/X11R6/lib/X11/fonts/misc
# mkfontdir .
Now it should contain the following two lines in fonts.dir:
eb5-24k2.pcf.Z -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
gb24st.pcf.Z -isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0
You can create other aliases for these fonts for the advantages of saving typing time when using Chinese softwares. Add the two lines in fonts.alias,
gb24st    "-isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0"
taipeik24 "-kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1"
Next, tell X Server to reload these fonts,
# xset fp rehash
If everything is fine, you can use the new fonts now:
# cxterm -GB -fn 12x24 -fh gb24st &

You can put these fonts into another directory, too, for instance, /usr/X11R6/lib/X11/fonts/chinese. If this works, you have to add this line /etc/XF86Config to the Section "Files",

    FontPath    "/usr/X11R6/lib/X11/fonts/chinese/"

So, when you start X next time, you can use these fonts without any problems.

Transformations from other fonts to X fonts

There is a TTF2BDF program, written by lwj, can let you transform the TTF fonts of Windows into BDF fonts. You can get it from here below:

ftp://linux.cis.nctu.edu.tw/packages/chinese/TTF2BDF.EXE
This is a Win32 program, thus you must execute it on Windows 95 or NT.

Next step is that change BDF into PCF, then you can use it under X. (You can use BDF directly under X; but that BDF carried with bigger sizes means PCF will be a better choice though.)

# bdftopcf -t < ming.bdf > ming.pcf

You may change HBF into BDF and PCF fonts, too. Here is the ftp site for the utility of transformation.

ftp://ftp.ifcss.org/pub/software/fonts/utils/hbf.tar.gz

# hbftobdf ccfs24.hbf > ccfs24.bdf
# bdftopcf -t < ccfs24.bdf > ccfs24.pcf

Other nice font conversion programs are available at:

ftp://crl.nmsu.edu/CLR/multiling/General/ttf2bdf-1.8-ELF.tar.gz
ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-3.0.tar.gz

5.3 TaBE & B5LE

TaBE and B5LE(Big5 Locale Environment) are projects both based on locale for solving the Chinese ability under X. If we can finish them, then the problems coming with Chinese I/O under X can be resolved thoroughly.

The TaBE author, shawn, has been taken for the military service in Taiwan, and the homepage of TaBE had been removed either(so awfully?), so this project has been dead from that time.

Author of B5LE is Thinker < Thinker.bbs@bbs.yzu.edu.tw>. However, the major platform is FreeBSD , though. If someone install B5LE successfully on Linux platform, please let me know about it. The concerned homepage is listed as follows:

http://ftp-cnpa.yzit.edu.tw/~thinker/B5LE/


Next Previous Contents

mirror server hosted at Truenetwork, Russian Federation.