converting to ditroff -- kern tables

William LeFebvre phil at RICE.ARPA
Sat Oct 26 21:01:49 AEST 1985


>From: jmg at dolphy.UUCP (Intergalactic Psychic Police Of Uranus)
> Thus, what is wanted is the
> length of your ascender and descender, for each font.  Nu?

Nu!  This is not exactly what is wanted, although your description of
kerning is accurate (and stimulating).

Troff has a very stupid idea of kerning.  In fact, almost no idea.  The
kerning table contains an entry for every character in the font.  This
entry is one of four possible values: 0, 1, 2, 3.  These values all
reflect vertical kerning (as described by jmg), but in a very low
resolution manner.  Here is how you obtain the value.  Start with 0.
If the character descends below the baseline, add 1.  If the character
extends above the center of the line (above the top of a lower case
"m"), add 2.  Thus, in the roman font, all upper case letters have a
kern value of 2 (except possibly a fancy "Q" which would have 3).  The
lower case letter "j" has a kern value of 3.  Letters like "a", "c",
and "e" have values of 0, and letters like "g" and "p" have 1.

This is all as it stands now.  Personally, I think the entire idea of
ditroff's kern tables needs to be rethought and reworked, but it will
probably never happen.  I also don't know of ANY utility (including
ditroff) that uses this information!  "Eqn" certainly should.  It needs
to know this information to place things correctly, but it does not use
it.  In fact, one of my pet peeves with the ditroff utilities "eqn" and
"pic" is that they don't look at ANY of the fancy *.OUT tables that
ditroff uses.  Both these utilities need to know the resolution of the
target device -- a value easily determined by looking in the DESC.OUT
file for the device.  But neither utility does this.  All the known
resolutions are hard coded into the programs!  Remember: the ditroff
distribution has a new version of "eqn".  I know the old version didn't
do this and I shouldn't expect it to.  But the version distributed with
ditroff certainly should!

			William LeFebvre
			Department of Computer Science
			Rice University
			<phil at Rice.arpa>
                        or, for the daring: <phil at Rice.edu>



More information about the Comp.unix.wizards mailing list