Display Chinese

Forum: DSL Tips and Tricks
Topic: Display Chinese
started by: oscar

Posted by oscar on June 08 2006,09:26

Having searched the web for how to display Chinese on DSL for days, I think I have found the eastiest way.  Just select MyDSL/System and select gnu-utils.dsl.info to install.  Then launch FireFox or Opera to test.  The result is not perfect, particularly for simplified chinese.  But for Hong Kong and Taiwan's traditional Chinese, it's acceptable.  Have a try.

Don't ask me why it can because I am also new to linux.  Ask other experts.

Let's DSL.


Posted by bokaroseani on June 15 2006,02:22
Has anyone else replicated this?
Posted by oscar on June 15 2006,10:08

I have also tried the procedure as described in
< http://www.tldp.org/HOWTO/Chinese-HOWTO.html >

The result is much much better.  But for the fonts, you'll have to download from
< http://www.ibiblio.org/pub/packages/ccic/software/fonts/big5/bdf/ >
< http://www.ibiblio.org/pub/packages/ccic/software/fonts/gb/bdf/ >
for traditional and simplified Chinese fonts.

Note that the command "compress"  as stated in th above doc is not in DSL and so I used gzip instead.

Take the font file "eb5-24k2.bdf.gz" for example.  Here are the steps:

# gzip -cd eb5-24k2.bdf.gz | bdftopcf -t > eb5-24k2.pcf
# gzip *.pcf
# mv *.pcf.gz /usr/X11R6/lib/X11/fonts/misc/
# cd /usr/X11R6/lib/X11/fonts/misc
# mkfontdir .
# xset fp rehash

At the time I write this message, I have installed :
and I am going to install the simplified Chinese fonts as well.


Posted by newby on July 09 2006,14:52
I've got a related question:

I want to write an internationalized ap that uses pin yin (latin characters with accent marks above).  The marks are:

\   (available in french, etc.)
/   ( ditto)
_  (a horizontal line above the vowel)
^  (turned point downward - these last two are the really sticky ones!)

My ap is straight text, not windowed fonts.  

The best I've found searching the web is "Pinyin Okay," which substitutes the umlaut for the horizontal line and the caret for the last example.  

Is there a keyboard setting that will give me the correct accents?

Pinyin Okay seems to be not very accepted by Chinese readers.

Posted by xitonghan on Mar. 05 2007,23:38
Posted by humpty on Mar. 06 2007,12:52
simplest way i know ;

< http://petepr.drivehq.com/dsl/tips_fonts.html >

Posted by xitonghan on Mar. 06 2007,17:42
How to add Chinese Fonts

Search 'google' for taipei16.pcf.gz. and download these fonts ( sizes 16,20,24) to .fonts/ directory.
Also create a file called  fonts.dir  to the same directory with the following lines;

taipei16.pcf.gz -taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0
taipei20.pcf.gz -taipei-fixed-medium-r-normal--20-200-75-75-c-200-big5-0
taipei24.pcf.gz -taipei-fixed-medium-r-normal--24-240-75-75-c-240-big5-0

Edit .xinitrc and near the top, add this line ;     xset +fp $HOME/.fonts


Posted by kissson on Jan. 13 2008,15:29
can i use ttf fonts like bkai and bsmi? and how
Posted by stupid_idiot on Jan. 14 2008,02:29
Hi kissson:
Not related to TTF fonts, but just to let you know, there's a CJK (Chinese Japanese Korean) MyDSL extension already:
< http://distro.ibiblio.org/pub....cjk.uci >
(You can also download this using the MyDSL Extension Browser. Just click on 'Testing' -> xfonts-cjk.uci)

This package uses plain bitmap fonts (*.pcf / *.pcf.gz), which works under Xvesa.
Unfortunately, bitmap fonts look good only at their native size.
They look rather ugly that sizes larger/smaller than the native size.
TTF fonts look good at all sizes.

Re: TTF fonts
TTF fonts are not supported by Xvesa, so you will need to use a full X11 server -- either XFree86 or Xorg.
You can get the XFree86 extension here:
< Xfree86.unc > [11M]
(Or: MyDSL Extension Browser -> UNC -> XFree86.unc)
You can get the Xorg extension here:
< xorg72.uci > [45M]
(Or: MyDSL Extension Browser -> Testing -> xorg72.uci)
Please Beware: The Xorg extension ('xorg72.uci') is still in a 'testing' state; it is VERY BIG (45M) at the moment.
So, I would recommend that you try 'XFree86.unc' [11M] first.

Re: Setting up TTF fonts
Please note that I am not experienced with setting up TTF fonts, so the following information might be incorrect:

1. System-wide font configuration (building lists of fonts, providing lists of fonts to applications) is done by fontconfig. Applications that use fontconfig (e.g. XFree86, Firefox, etc) are linked against the fontconfig library (libfontconfig.so.1). We can rebuild the fontconfig font list (i.e. font cache) by using the provided fontconfig utilities:
-- 'fc-cache' will rebuild the font cache.
-- 'fc-list' will list the available fonts on the system.
So, we need to first install the new TTF fonts and then run 'fc-cache'; then the applications that use fontconfig (e.g. Firefox) will have access to the new TTF fonts.

2. DSL does not have any TTF fonts that come as MyDSL Extensions, so you will need to download TTF fonts from the Net.
Regardless of what TTF fonts you use:
TTF fonts should be placed in any one of the directories that are used by fontconfig.
To see which directories are used by fontconfig, please look at the file '/etc/fonts/fonts.conf', and then look for <dir> tags.
This is the relevant section:
Code Sample
       <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>/var/lib/defoma/x-ttcidfont-conf.d/dirs</dir>
This means we can put our TTF fonts under any of the above directories.
Perhaps you might want to use '~/.fonts/' (i.e. '/home/dsl/.fonts/'). Then, you can let DSL backup your fonts and restore them when you reboot.

Anyway, once you have placed the files in any of the above directories, you should run:
Code Sample
This will rebuild the fontconfig cache.

Then, you can start your web browser and go to a Chinese webpage to see if your new fonts work.
If not, maybe you should go to 'Firefox -> Edit -> Preferences -> Fonts & Colors -> [Simplified/Traditional] Chinese' and see if you can manually select your new fonts.

I am not sure whether the above will work.
Please correct me if any of the above is wrong -- thanks everyone.

The bitmap font package ('xfonts-cjk.uci') is very easy to setup and install, so if you don't mind the fonts being somewhat uglier than TTF fonts, maybe you might like to try that first.

Posted by curaga on Jan. 14 2008,15:42
@stupid_idiot - btw it's possible to compile tinyX with TTF support
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.