Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: japanese fonts: ttf, ghostscript + vflib, XFree 4.0.x



John Seebach <jseebach@example.com> writes:

> Next question:
> 
> Can XFree 4.0.x serve multibyte truetype fonts correctly? I'm
> currently using 3.3.6 with xfstt, which can't, and the Japanese hack
> of xfs seemed kind of scary the last time I checked. 

Yes, works fine with XFree 4.0.x.

XFree 4.0.x has two modules for displaying truetype fonts.
You can select which one you want to use in /etc/X11/XF86Config
in the section "Module":

    Section "Module"
      Load  	"type1"
      Load  	"speedo"
      Load  	"extmod"
      Load  	"freetype"
    EndSection

Instead of "freetype" you can also use "xtt". The module "xtt" is
the stuff from the Japanese X-TT project, which has been included into
XFree86-4.0.x. "freetype" is from the xfsft project.

Both work for Asian fonts. Discussing which one is better sometimes
seems to result in flame wars. I tried both and didn't find that much
difference. Both work fine for me. 

If you use "freetype", you have to make sure that you have
"encodings.dir" files in each directory where you have truetype
fonts. These "encodings.dir" files are generated by "mkfontdir", see
the manpage of the new mkfontdir which comes with XFree86-4.0.x. If you
don't yet have the "encodings.dir" files "freetype" won't work with
asian fonts. So create them if necessary. And don't gzip the
encodings.dir files, then it won't work either.

If you use "xtt" you don't need the "encodings.dir" files, because all
encodings are hardcoded into "xtt" and are not read from configuration
files like "encodings.dir".

The possible syntax for the fonts.scale files is slightly different
for "xtt" and "freetype". A line like

    watanabe-mincho.ttf -watanabe-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0

in fonts.scale/fonts.dir works for both "xtt" and "freetype". But you
can add some options to the start of such a line and the possible
options and their syntax differ for "xtt" and "freetype".

For example with "xtt" you can use something like 

    ab=y:ai=0.4:watanabe-mincho.ttf -watanabe-mincho-bold-i-normal--0-0-0-0-c-0-jisx0208.1983-0

which creates a bold-italic font by distorting the original font.
The possible options of "xtt" are explained somewhere on the X-TT
website:

    http://X-TT.dsl.gr.jp/index.html

"freetype" does not support as many options as "xtt", for example it
is not possible to create bold and italic versions from normal fonts
with "freetype", as far as I know.

-- 
Mike Fabian   <mfabian@example.com>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links