stupid_idiot
Group: Members
Posts: 344
Joined: Oct. 2006 |
|
Posted: 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/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: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!
|