Mailing List Archive

Support open source code!


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

How to use Japanese True Type fonts?



>>>>> "Mike" == Mike Fabian <mfabian@example.com> writes:

    Mike> Has anybody tried to use Japanese True Type fonts with
    Mike> Linux?  What is the best way to do this? Which fontserver
    Mike> can be recommended for that purpose?

I've had some success at various times in the past with VFlib and XTT
versions of the X Server and/or X Font Server.  But they involve
nonstandard and (IMO) poorly designed extensions.  In particular, they
will not be upward compatible with OpenType, which addresses many of
the same problems.

    Mike> http://www.linux.or.jp/~ishikawa/linux/dists/FreeType/xtt-fonts_0.19990222-3.tar.gz

    Mike> Until now I tried to use these fonts with XFree86-4.0
    Mike> (should have support for True Type fonts already build in)
    Mike> and with the font server 'xfstt' but without any success.

Yup.  Those are fonts intended for use with the XTT fork of XFree86.
Parts of that were attempted to be merged into XFree86 4.0, but not
entirely successful.  The differences between xfstt and xfs-xtt
remained substantial as of January 2000.

(I don't know any of this first hand, and I'm not using XFree86 4.0 yet.)

    Mike> First I tried it with XFree86-4.0.  I unpacked the tarball
    Mike> (which contains the fonts, fonts.dir, and fonts.alias
    Mike> files), and added the directory to X's fontpath with

You might try mv'ing the fonts.* files out of the way and rewriting
them to xfstt's satisfaction (by hand, I doubt whether ttmkfdir is
capable of dealing with Japanese fonts).  They very likely use
features of xfs-xtt which were either not merged into xfstt or are
still unstable (if there have been recent successes on this front).

    Mike> Then I deleted the original fonts.dir and fonts.alias and
    Mike> created a new fonts.dir with the 'ttmkfdir' utility:

    Mike>     mfabian@example.com:~/xtt-fonts-0.19990222$ ttmkfdir > fonts.dir
    Mike>     unknown font foundry code LYJS
    Mike>     unknown font foundry code LYJS

Uh-oh....

I noticed that you have 4 pairs of duplicate font names in the
fonts.dir output.  Is this correct?

    Mike> Then I tried to use xfstt. I used the option '--unstrap'
    Mike> when starting 'xfstt' (according to the documentation this
    Mike> option is necessary to display more then the first 256
    Mike> characters in a font) and started the X-server with the
    Mike> option '-deferglyphs 16' (this is also recommended in the
    Mike> documentation of xfstt). But nevertheless, 'xfd' did never
    Mike> show me more than the first 256 characters.

Are you sure the fontserver comes earlier in the fontpath?  It must be
added explicitly.  You should also delete the directory from the
fontpath so that you know for sure the font is coming from the font
server and not the X server.

Does the 4.0 version still have --encoding?  You probably need that to
export jisx0208.1983 if it still does.  What is the UNSTRAPLIMIT
(compile-time variable) for 4.0?  If it's below the kanji, you're not
going to have a chance anyway.

    Mike> Maybe XFree86-4.0 and xfstt are not able to display Japanese
    Mike> True Type fonts?

Dunno.  Wouldn't be surprised, although I thought this did work.

    Mike> Has anybody tried X-TT (http://x-tt.dsl.gr.jp/)? Does this
    Mike> work better? According to the installation manual of X-TT it
    Mike> is distributed in form of patches against XFree86 3.3.5, so
    Mike> maybe this doesn't work with XFree86-4.0 at all?

Build the font server separately.  I have no problems running both
xfstt and xfs-xtt (but I don't have time to play with it and make sure
they're actually working at the moment, although they have been
simultaneously effective in the past).  (The TT fonts packages
consistently broke my XF86Config, and XF86 upgrades consistently broke
on existing TT fonts.  So I gave up....)

Rumor had it XTT was in disarray from the attempt to merge with
XFree86 (which failed).  Just a rumor, though.

Those Watanabe fonts are available from the Ghostscript FTP site
(ftp.cs.wisc.edu, and maybe SourceForge as well) in source form with
utilities to translate them to BDF and Type 1 (actually Type 0)
formats (and several others).  I occasionally use them in Type 1
format, which works fine (but they're kinda klunky at < 30pt; I prefer
the bitmap fonts).

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links