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

xterm with combining characters



http://www.ecs.soton.ac.uk/~rwb197/xterm/

A suggestion for handling combining characters in fonts and xterm:

At the moment, the fixed fonts have spacing combining characters, i.e.,
every combining character is as wide as a normal character. Some other
proportional fonts (e.g., those by B&H and Mark Leisher) have zero-width
combining characters with link left of the origin. I am wondering,
whether I should also do this for the fixed fonts. It would strictly
speaking violate the CharCell definition, but it would also cause normal
X string output routines for proportional fonts to draw the combining
characters correctly if they appear in a string, without extra magic.

The original motivation for strictly following the definition of a
CharCell font was only that we had assumed that this would cause no
memory to be allocated for font metric information. We now know that
this is unfortunately not the case. So we could as well have zero-width
combining characters in CharCell fonts, in order to make sure that the
combining characters show up correctly not only in xterm, but also at
any place where X outputs strings and can handle proportional fonts.

Suggestion: Check in xterm the width of each combining character before
printing it. If it has a non-zero width (as it does now in the fixed
fonts), then print it at the position of the base character (explicit
overstriking). If it has zero width, then print it at the position of
the character following the base character (as XDrawString would do as
well), assuming that a zero-width combining character will have all ink
left of the origin and therefore does the overstriking correctly from
the following cursor position (implicit overstriking).

Is this feasible and desirable? It will allow us more flexibility on
what we decide eventually about handling combining characters in fonts.

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/