DSL Tips and Tricks :: Display Chinese



simplest way i know ;

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

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;

3
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

Reboot.

can i use ttf fonts like bkai and bsmi? and how
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/share/fonts</dir>
       <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>/var/lib/defoma/x-ttcidfont-conf.d/dirs</dir>
       <dir>~/.fonts</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
fc-cache
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.

p.s.
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.
Thanks!

@stupid_idiot - btw it's possible to compile tinyX with TTF support
Next Page...
original here.