Article View: comp.text.tex
Article #2752Kerning (was Re: Calligraphic LaTeX ?!)
From: Hosek, Donald A.
Date: Sun, 03 Jun 1990 13:21
Date: Sun, 03 Jun 1990 13:21
139 lines
4953 bytes
4953 bytes
In article <9702@discus.technion.ac.il>, joel@techunix.BITNET (Yossi (Joel) Hoffman) writes...
>I've considered doing this; but I wonder how the kerning (if I have my
>terms straight) would work. When "WA" is typeset, the 'W' actually
>ends up partially "over" the 'A.' Is this an automatic process? If I
>make a caligraphic 'A' that looks like, say:
> ____________________
>/ /\
> / \
> / \
> /======\
> / \
> / \
> / \
>and put it after a sentence that ends with 'i,' so that I had "i. A"
>would I automatically get:
> ____________________
>/ /\
> / \
> o / \
> /======\
> | / \
> | / \
> | o / \
>
>or do I have to specify each case of kerning separately?
There are two ways to handle character "overlap" with TeX fonts.
The first is to have TeX think the character is smaller than it
appears by drawing outside of its bounding box. A very common
case of this occurs in many lower case f's which (with their
bounding box) appear something like this:
+---------+
| xxxxxxxxxxx
| xxxxxxxxxxxxx
| xxx | xxx
| xxx |
| xxx |
| xxx |
| xxxxxxx |
| xxxxxxx |
| xxx |
| xxx |
| xxx |
| xxx |
| xxx |
| xxxxx |
| xxxxx |
+---------+
Note that TeX does not maintain any sidebearing information other
than the box sizes (see the TeXbook, pp. 63-67). Thus the above
letter followed by, say, "o" would be typeset as (showing
bounding boxes still).
+---------+
| xxxxxxxxxxx
| xxxxxxxxxxxxx
| xxx | xxx
| xxx |
| xxx |
| xxx +---------------+
| xxxxxxx | xxxxx |
| xxxxxxx | xxxxxxxxx |
| xxx | xxxx xxxx |
| xxx | xxxx xxxx |
| xxx | xxxx xxxx |
| xxx | xxxx xxxx |
| xxx | xxxx xxxx |
| xxxxx | xxxxxxxxx |
| xxxxx | xxxxx |
+---------+---------------+
note the overhang.
The other possibility would be to set up implicit kern pairs.
(this is described in the MFbook, pp. 316-7). You want to do this
only in the cases where only a certain pair of letters should be
brought closer together. Let's spell a word and toss an "x" onto
the end of the above two letters:
+---------+
| xxxxxxxxxxx
| xxxxxxxxxxxxx
| xxx | xxx
| xxx |
| xxx |
| xxx +---------------+---------------+
| xxxxxxx | xxxxx | xxxx xxxx |
| xxxxxxx | xxxxxxxxx | xxx xxx |
| xxx | xxxx xxxx | xxx xxx |
| xxx | xxxx xxxx | xxxxx |
| xxx | xxxx xxxx | xxx |
| xxx | xxxx xxxx | xxxxx |
| xxx | xxxx xxxx | xxx xxx |
| xxxxx | xxxxxxxxx | xxx xxx |
| xxxxx | xxxxx | xxxx xxxx |
+---------+---------------+---------------+
There's a bit too much space between the "o" and the "x" here.
What we can do is tell TeX to bring those two letters a little
closer together; this will give us something that looks like this
instead (I've removed bounding boxes here to keep things a little
less cluttered. The "x" is now two pixels closer to the "o"):
xxxxxxxxxxx
xxxxxxxxxxxxx
xxx xxx
xxx
xxx
xxx
xxxxxxx xxxxx xxxx xxxx
xxxxxxx xxxxxxxxx xxx xxx
xxx xxxx xxxx xxx xxx
xxx xxxx xxxx xxxxx
xxx xxxx xxxx xxx
xxx xxxx xxxx xxxxx
xxx xxxx xxxx xxx xxx
xxxxx xxxxxxxxx xxx xxx
xxxxx xxxxx xxxx xxxx
MFhackers and MF-wannabe-hackers should have both the MFbook and
volume E of C&T (Computer Modern Typefaces) handy if they want to
really have a good feel for the language and how it works.
-dh
---
Don Hosek "When I was younger, I would throw
dhosek@ymir.claremont.edu spitballs at girls that I liked. Now,
dhosek@ymir.bitnet I beg and plead for dates. Frankly, the
uunet!jarthur!ymir old way was more satisfying."
Technical Details
Message-ID:
<7384@jarthur.Claremont.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!snorkelwacker!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!jarthur!usc!ucsd!helios.ee.lbl.gov!pasteur!ucbvax!techunix.BITNET!joelReferences:
<13530001@hpccc.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!snorkelwacker!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!jarthur!usc!ucsd!helios.ee.lbl.gov!pasteur!ucbvax!techunix.BITNET!joel From: dhosek@sif.claremont.edu (Hosek, Donald A.) Newsgroups: comp.text.tex Subject: Kerning (was Re: Calligraphic LaTeX ?!) Message-ID: <7384@jarthur.Claremont.EDU> Date: 3 Jun 90 13:21:26 GMT References: <13530001@hpccc.HP.COM> Sender: news@jarthur.Claremont.EDU Reply-To: dhosek@sif.claremont.edu Organization: Harvey Mudd College Lines: 139