Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!phil@RICE.ARPA From: phil@RICE.ARPA (William LeFebvre) Newsgroups: net.unix-wizards Subject: Re: converting to ditroff -- kern tables Message-ID: <2457@brl-tgr.ARPA> Date: Sat, 26-Oct-85 06:01:49 EST Article-I.D.: brl-tgr.2457 Posted: Sat Oct 26 06:01:49 1985 Date-Received: Sun, 27-Oct-85 07:30:26 EST Sender: news@brl-tgr.ARPA Lines: 39 >From: jmg@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 Universityor, for the daring: