Tomohiro KUBOTA wrote on 2001-04-03 02:34 UTC:
> BTW, XTerm has a policy that doublewidth character is supported using
> another font from normalwidth character.  Thus, it does not support,
> for example, GNU unifont.

Xterm does fully support GNU Unifont. GNU Unifont comes in a hex file
format that Roman Czyborra invented. To use GNU Unifont with xterm, you
just need a tiny Perl script that generates two BDF fonts (8x16 and
16x16) of of the hex master version.

However, xterm does *not* support the BDF files produced by the (IMHO
broken) hex2bdf Perl script on Roman's web site, which stuffs both 8x16
and 16x16 gylphs into the same BDF file and nevertheless calls the
result a charcell font. This is not conforming to the XLFD standard,
which required charcell fonts to have identical sizes for all glyphs.

The two font approach also has the advantage that the application and
not the font decides, which character is normal or wide. This simplifies
switching between different wcwidth definitions without changing font
styles.

> IMO, if "common font both for singlewidth and doublewidth" way is proved to
> be convenient, it may be supported, though it may bring width-conflict
> problem.

Since xterm has no way of communicating to the application using the
terminal, which character is how wide, I really think that either xterm
of libc should via wcwidth have control on how many columns each
character occupies, and not a font file.

The other way out of the problem that my_wcwidth and simsun.ttf disagree
is the following: Add to xterm an option to use the libc version of
wcwidth instead of my_wcwidth, and then write yourself a locale that
matches the width convention of simsun.ttf.

You might also find that

  wcswidth_cjk

in

  http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

is a my_wcwidth substitute that is backwards compatible with existing
CJK fonts and width conventions, but that is less desirable for Western
users (who fail to see the point of wide Cyrillic and Mathematic
characters, etc.).

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to