The character pair kerning you describe is what is used for text, and is typically NOT what you want to do for typesetting mathematics. For example, if you have a sequence of unsubscripted variables concatenated (as for multiplication), you don't want them to kern--e.g., f times i times n would look wrong in the mathematical sense if kerned, it would look like the italicized word fin instead. What CTI did, in those days of limited processing power, was to preprocess each character's bitmap, computing a quantized sequence of 12 values describing the left and right outlines of the character relative to its bounding box (the horizontal escapement of the character when typeset by the actual vertical extent). The bounding box was broken vertically into 6 equal pieces. The left and right outlines of the character were then each represented by 6 integers, with the horizontal increments being .05 em, and ranging from something like -2 (farthest inside the bounding box) to +4 (farthest outside the bounding box). (I'm not sure I have the details exactly right--it's been a couple of lifetimes ago.) The kerning algorithm matched the right side of one character with the left side of the next, handling such things as different baselines and sizes (e.g., for sub and superscript), and even different obliquing (greek letters were typically obliqued, as were sans serif fonts which typically didn't have separate italic subfonts). Larger constructs, like accented characters and built-up fractions, had their left and right sides computed on the fly if they needed to be kerned with adjoining characters or constructs. During the development of the kerning algorithm, it was discovered that some smoothing and limiting was necessary to avoid undesirable results such as the exponent in e**-x from sliding over the e! --ms On 2012-10-23 04:58, Gareth McCaughan wrote:
On Tuesday 23 October 2012 04:05:15 Mike Speciner wrote:
I'm not familiar with TeX's kerning facility (and the last I looked, which was a very long time ago, it didn't have any), Wow.
Kerning is described in the "TEXDRA.FT" document Knuth put out in May 1977, well before any version of TeX was actually released. On the other hand, the next version of that document, TEX.ONE in July of the same year, seems to imply no kerning. The first book made with TeX, a keepsake for Knuth's wife's relations made in late 1978, has no kerning. There was definitely kerning by 1981 (in particular, before the big transition from TeX78 to TeX82).
Does anyone know more exactly when kerning was introduced to TeX?
but typical kerning is done by a table of character pairs within the same font and size. CTI kerning was done by letter shape and could handle any horizontal juxtaposition of characters, even if they were from different fonts and at different sizes/obliquenesses/baseline (as would happen with subscripts and superscripts, math symbols, greek letters, etc.).
Yes, TeX uses a table of character pairs within each font. So CTI did some kind of optical kerning? Can you say anything about the algorithms used?