Sie sind auf Seite 1von 9

# 114

The Letter S
Donald E. Knuth

EVERAL YEARS AGO when I began to look at .I., con quello rondo quale ha lo suo puncto de mezo fora del
S the problem of designing suitable alphabets for use
with modern printing equipment, I found that 25 of
quadro, longe da la inferiorc linen dcl quadro puncto mezo.
Poi largo Io circino puncti .z., ponendo una puncta dove fi-
the letters were comparatively easy to deal with. The nisti la inferiore parte del .S. qual fu facta a drita linea, cioh
other letter was 'S'. For three days and nights I had longe da la linea del spacio da parte drita puncti .z., e altri
a terrible time trying to understand how a proper 'S'
could really be defined. The solution I finally came
up with turned out to involve some interesting math-
ematics, and I believe t h a t students of calculus and
analytic geometry may enjoy looking into the question
as I did. The purpose of this paper is to explain what I
now consider to be the 'right' mathematics underlying
printed S's, and also to give an example of the META-
FONT language I have recently been developing. (A
complete description of M~'TAFONT, which is a com-
puter system and language intended to aid in the design
of letter shapes, appears in [3, part 3].
Before getting into a technical discussion, I should
probably mention why I started worrying about such
things in the first place. The central reason is t h a t
today's printing technology is essentially based on
discrete mathematics and computer science, not on
properties of metals or of movable type. The task of
puncti .4. da la [linea] inferiore del quadro. L'altra puncta
making a plate for a printed page is now essentially
longe da quella del spacio da parte sinistra puncti.z, descen-
t h a t of constructing a gigantic matrix of O's and l's,
derai in tondo verso man drita tanto che giongi sopra la me-
where the O's specify white space and the l ' s specify dia linen. Poi con dicta largheza de circino ponendo l'una
ink. I wanted the second edition of one of my books puncta dove al prescnte finisti, l'altra puncta longe da la li-
to look like the first edition, although the first edition nea del spacio da parte sinistra puncti .z., venendo dal dicto
had been typeset with the old hot-lead technology; and ultimo loco del .S. tanto che sin lontano da la inferiore linea
when I realized that this problem could be solved by del quadro puncti .z. Poi da questa ultima parte in tondo
using appropriate techniques of discrete mathematics vengasi a drita linen a congiungere con 1o inferiore rondo
and computer science, I couldn't resist trying to find longe da la linen da parte sinistra del quadro puncti.i.e s e t t e
my own solution. octavi; ~ sara finita la littera .S., come apertamente si vede.
Reference  explains more of the background of
my work, and it also discusses the early history of math- Fig. 1. Franeesco Torniello's method of "squaring the S" in
ematical approaches to type design. In particular, it 1517. (This is page 45 of [41, reproduced by kind permission
illustrates how several people proposed to construct S's of Officina Bodoni in Verona, Italy.)
geometrically with ruler and compass during the six-
teenth and seventeenth centuries. in order to get some feeling for the problems involved.
Francesco Torniello published a geometric alpha- Paraphrasing his words into modern mathematical ter-
bet in 1517 that is typical of these early approaches. minology, we can state the method as follows:
L e t ' s look at his construction of a n ' S ' (cf. Fig. 1), A n ' S ' is drawn in a 9 X 9 square t h a t we can
represent by Cartesian coordinates (x, y) for
The preparation of this article was supported in part by National 0 ~ x ~ 9 a n d 0 _ < y ~ 9. We shall define
Science Foundation grants MCS-7723738 and IST-7921977, by fourteen points on the boundary of the letter,
Office of Naval Research grant N00014-76-C-0330, and by the calling them (Xl, Yl), (X2, Y2), . . . , (X14, Y14).
IBM Corporation. The author gratefully acknowledges the help
ofXerox Palo Alto Research Laboratory facilities for the prepara- Point 1 is (4.5, 9), and a circular arc is drawn
tion of several illustrations. All of the letters and symbols in this from this point with center at (4.5, 5.5) and
report were designed mathematically, using MFZTAFONT. radius 3.5 ending at point 2 where x2 z 6.
115
[Hence Y2 = 5.5 ~- x/10 ~ 8.66.1 A small (--r, h)
arc is drawn with center (6.5, 9) and radius .5
from point 3 = (6.5, 8.5) to (7, 9). A straight
line is drawn from point 4 = (6, 7) to where
it is t a n g e n t to this small arc; let us call this
point 5. [We shall see below t h a t point 5 has
the coordinates (61~ , 8 ~x3) , . it is interesting
to speculate a b o u t whether Torniello would
have been h a p p y to know this.[ Now an arc
is drawn with center (4, 7) and radius 2, from
point 6 = (4, 9) down to point 7 where x7 = 3
(z, y)
and Y7 < 7 [hence Y7 : 7 - - x/~ ~ 5.27]. A
straight line is drawn from point 7 to point (--r, 0)
8 = (5, 4). An arc centered at (4.5, 7~) is
now drawn from point 4 to point 9 = (3.5, 6), Fig. 2. A problem that arises in Torniello's construction:
and a straight line continues from there to Find x and y, given r and h.
point 10 : - (6, 4.5). A half-circle runs from
this point to point 11 = (3, 0.5), with center The calculation of point 5 suggests an elementary
(4.5, 2.5) and radius 2.5. A n o t h e r small cir- b u t instructive exercise in analytic geometry: Given
cular arc is now drawn with center at (2.5, y) positive n u m b e r s h a n d r, find the p o i n t (x, y) in the
and radius 1, from point 11 to point 12 where u p p e r right portion o f a circle o f radius r, centered
x , 2 = 17 [hence y = (1 - - vP3)/2 ~ --.37 at the origin, such t h a t the straight line f r o m ( - - r , h)
and Y12 = ( v / ~ ~- 4 - - 4 x / ~ ) / 8 ~ 0.41]. Cir- to (x, y) is t a n g e n t to the circle at (x, y). (See Fig.
cular arcs of radius 2 are drawn from point 8 2.) We h a v e x 2 @ y 2 = r 2andy/x=tan0=
to point 13 with the center z-coordinate (x @ r ) / ( h - - y), hence z 2 -F- r x ~- y2 _ y h = 0 and
equal to 4 and with z13 = 4.5 [hence the r z = hy - - r 2. This leads to the equation 0 =
center is (4, 4 - - v/3 ~ 2.27) and Y 1 3 (by - - r2)hy @ r2y(y - - h) = r x ( r x @ r 2) -}- r2y(y - - h),
4 - - x/~ - - 3~3.75.75~ 0.33], and from point 13 hence y(h2y - - hr 2 @ r2y - - hr 2) = 0 and we soon obtain
to point 14 with the center z-coordinate equal the desired solution
to 4.5 and with Y14 = 2 ]hence the cen-
ter is (4.5, 6 - - x / 3 - 3x/3.~.75~ 2.33) and h2r _ r 3 2hr 2
x-- h2~_r2 , y h2_~r2.
X14 : 4.5 - - V / 4 - - ( 4 - - x / ~ - - 3x/T.~.75)2 ~ 2.53.]
Finally a straight line runs from point 14
T h e solution is a rational function of h and r (i.e.,
to point 12.
no square roots are needed) because the other tangent
The reader will find it interesting to take a piece of point is ( - - r , 0); this other point also satisfies the stated
graph p a p e r and carry out this vintage construction equations. Ren~ Descartes would surely have liked this
before proceeding further. Torniello's description was d e m o n s t r a t i o n of the power of his coordinate system.
actually not so precise as this, and I have tried to m a k e Torniello's construction can be expressed w i t h o u t
as much sense out of his words as possible; it seems difficulty in the M E T A F O N T language, a language
t h a t he had as much trouble with S's as I did, because t h a t I have recently developed for stating definitions
his other letters are much more clearly defined. The of character shapes in a form t h a t is convenient
main editorial revision I have m a d e is to change the for c o m p u t e r processing. A l t h o u g h ruler-and-compass
center of the arc between points 4 and 9 from Torniello's m e t h o d s do not really use very m a n y of M I : T I C l F O N T ' s
(4.5, 7~) to the nearby point (4.5, 7~), and to leave its abilities, we can learn something a b o u t M E T A I = O N T by
radius u n s t a t e d [he said the radius would be 1.5, b u t looking at this as a first example.
actually it is lv/~5/8, a trifle higher], since (4.5, 7~) is The key points of a particular design are specified
not equidistant from points 4 and 9. in META~ONTese by writing equations for their x and
Note t h a t the circular arc between points 10 and 11 y coordinates; then you can say "draw i . . j " to draw a
is t a n g e n t to the baseline at (4.5, 0) and it has a vertical straight line from point i to point j. You can also say
t a n g e n t at point (7, 2.5); this works out nicely because "draw i{a, fl}.. j { q , 5}" to draw a curve from point i
32 @ 42 = 52, and I believe Torniello did know enough starting in the direction of the vector (a, fl) and ending
m a t h e m a t i c s to m a k e use of this pleasant coincidence in at point j in direction (% 6). This curve will be a cir-
his design. He never stated exactly w h a t curves should cular arc if there is a circle passing t h r o u g h i and j in
be used between points 1 and 6 or between 2 and 3; the stated directions, provided t h a t the circular arc is
a p p a r e n t l y a straight line segment should join 1 and 6, at m o s t a half-circle. Thus, Torniello's construction can
while the other curve is to be filled in with w h a t e v e r be expressed with complete precision by the following
looks right. M E T A F O N T program:
116
Xl = 4.5u; yl ---- 9u;
x2----6u; y2--5.5u----
aqrt((3.5u)(3.5u) - - (x2 - - 4.5u)(x2 - - 4.5u));
draw l { y l - - 5.5u, 4.5u - - x l } ..
2{y2 - - 5.5u, 4.5U - - X2};
X3 = 6.5U; Y3---- 8.5U;
X4=6U; y4=7U;
3;~ = (6 + ~ ) ~ ; y~ = (8 + ~)~;
draw 3{9u - - Y3, x3 - - 6 . 5 u } . .
5{9u - - ys, x5 - - 6.5u};
draw 4 . . 5;
3;6 = 4u; Y6 = 9u;
x7 = 3 u ; 7u--y7 =
sqrt((2u)(2u) - - (x7 - - 4u)(3;7 - - 4u));
d r a w 6{7u - - Y6, 3;6 - - 4 u } . . 7 { 7 u - - PT, 3;7 4u};
3;s~---5u; P s = 4 u ; d r a w 7 . . 8;
3;9 = 3.5u; y9 = 6u;
3;15 ---- 4.5u; Y15 - : 7.125u =
sqn((3;9 - 4.5~)(3;9 - 4.5~) +
(y9 - - 7.125u)(y9 - - 7.125u));
draw 4{7.125u - - y4, 3;4 - - 4 . 5 u } . . 1 5 . .
9{7.125u - - yg, 3;9 - - 4.5u};
3;lo = 6u; ylo---- 4.5u; d r a w 9 . . 10; Fig. 3. T h e M E T A ~ O N T p r o g r a m in t h e t e x t will produce
x l l : 3u; y l l : .5U; this r e n d i t i o n of Torniello's S.
draw 10{ylo - - 2.5u, 4.5u - - 3;lO}..
l l { y l t - - 2.5u, 4 . S u - - xH};
t h e d r a w i n g w i t h a p p r o p r i a t e n o n - c i r c u l a r c u r v e s if w e
x16 ---- 2.5u; Yll - - y16 ----
sqrt(u.u - (3;11 - - x 1 6 ) ( 3 ; 1 1 - - 3 : 1 6 ) ) ;
-

## 3;12 : 1.875u; y 1 2 - - y 1 6 = draw 1 . . 6;

s q r t ( u . u - - (3;12 - - x16)(x12 - - 3;16)); draw 2{y2 - - 5.5% 4.5u - - z 2 } . . 3{9u - - Y3, x3 - - 6.5u}.
draw 11{y16 -- yll, Xll -- :El6} . .
12{y16 - - Y12, X 1 2 - - X l B } ; These tangent directions match the tangents at which
3;13 : 4.5u; 3;17 = 4u; ys - - y17 :
t h e n e w c u r v e s t o u c h t h e old. ff w e a s k METAF{:)NT
sqrt((2u)(2u) - - (xs - - x17)(3;s - - 3;17));
t o fill i n t h e s p a c e b e t w e e n t h e s e b o u n d a r y c u r v e s , we
y17 - - y13
o b t a i n F i g . 4.
sqrt((2u)(2u) - - ( x 1 3 - - x 1 7 ) ( i E 1 3 - - 3 ; 1 7 ) ) ;
d r a w 8 { y s - - y17, X 1 7 - - 3 ; 8 } - 9 When the circular arc comes to point 7 from point
13{y13 - - y17, X 1 7 - - 3 ; 1 3 } ; 6 i t is t r a v e l l i n g i n d i r e c t i o n { 7 u - - YT, x7 - - 4 u } ----
X18 : 4.5u; Y~s - - y13 ~--- {v~u,--u}, b u t w h e n it p r o c e e d s f r o m p o i n t 7 i n a
straight line to point 8 it abruptly shifts to direction
Y14 = 2U; X18 -- 3;14 =

## draw 13{yt3 - - yls, x l s - - x13} ..

14{y14 -- y 1 8 , 3;18 - - 3;14};
d r a w 14.. 12.

H e r e " u " is a n a r b i t r a r y u n i t o f m e a s u r e t h a t c a n b e
u s e d a s a scale f a c t o r t o c o n t r o l t h e o v e r a l l size o f t h e
drawing. This program looks somewhat formidable at
f i r s t g l a n c e , b u t i t r e a l l y is n o t h a r d t o u n d e r s t a n d
once you compare it to the informal English description
g i v e n e a r l i e r . A f e w m o r e p o i n t s , l a b e l e d 15, 16, 17, a n d
18, h a v e b e e n i n t r o d u c e d ; p o i n t 15 c o a x e s M E T A F O N T
to draw a circular arc bigger than a semicircle, and the
o t h e r t h r e e p o i n t s a r e c e n t e r s o f a r c s in t h e c o n s t r u c -
t i o n . T h e m a i n f a c t u s e d t h r o u g h o u t is t h a t a c i r c u l a r
a r c w i t h c e n t e r (Xk, Y k ) t h a t p a s s e s c l o c k w i s e t h r o u g h
p o i n t ( x i , Yi) is g o i n g i n d i r e c t i o n { Y i - - Yk, X k - - x i } ,
w h i l e if t h e a r c is g o i n g c o u n t e r c l o c k w i s e i t s d i r e c t i o n
is { Y k - - Yi, x i - - x k } .
Fig. 3 shows what META~ONT draws from the
a b o v e s p e c i f i c a t i o n s . M E T A F O N ' Y will also c o m p l e t e Fig. 4. T h e curve of Fig. 3, c o m p l e t e d a n d filled in.
117

## Fig. 6. When Fig. 5 is stretched 20% in the horizontal

Fig. 5. A slight modification of Fig. 4 makes the curves
direction, we obtain this figure; the circles have become
smoother at the junction points.
ellipses.

{xs - - xT, Ys - - YT} ---- {2u, (xf3 - - 3)u}. This discon- By studying this example we can get some idea of
tinuity is only slightly noticeable in Fig. 4, but it is un- the problems involved in specifying a proper S shape.
satisfactory from a mathematical standpoint. Similar However, I was actually seeking the solution to a more
discontinuities occur at points 8, 9, 10, and 13, the general problem than the one Torniello faced: Instead
problems at points 9 and 13 being especially prominent; of specifying only one particular 'S', I needed m a n y
the illustration in Torniello's book had to be fudged different variations, including bold face versions that
slightly to hide these defects (which Torniello did not are much darker than the normal text. I discussed
mention). Contemporary standards of accuracy were this recently with Alan Perlis, who pointed out that
presumably not very stringent in the sixteenth century, a central issue arising whenever we try to automate
but nowadays we do not want our computers to draw something properly is what he calls "the art of making
such crooked lines. constant things variable." In the case of letter design,
Since METAFONT has no special commitment to we don't merely want to take a particular drawing and
circular arcs, it will automatically make adjustments come up with some mathematics to describe it; we
like Torniello's illustrator did if we just specify consis- really want to find the principles underlying the draw-
tent directions at all of the key points. Fig. 5 shows the ing, so that we can generate infinitely many drawings
result if the tangents at points 7, 8, 9 and 10 are taken (including the given one) as a function of appropriate
as the directions of the straight line segments and if the parameters. My goal was to create entire alphabets that
direction at point 13 is horizontal. Furthermore point would depend on a dozen or two parameters in such
6 has been moved over to coincide with point 1, so that a way that all the letters would vary in a compatible
the unfortunate fiat spot at the top is avoided. The manner as the parameters would change.
curves touching these points are not circles any longer, After looking at these Renaissance constructions
but they are close enough to fool most people, and it and a lot of modern S shapes, I came to the conclusion
seems unlikely that Torniello would have been offended that the main stroke of the general S curve I sought
by this approximation. would be analogous to the curve in Fig. 6: each bound-
A Renaissance 'S' looks somewhat skinny to ary curve was to be an ellipse followed by a straight line
modern eyes. We can ask METAFONT to flesh it out by followed by another ellipse. This led me to pose the
increasing all the x coordinates by 20% while leaving following problem: What ellipse has its topmost point
the y coordinates fixed; Fig. 6 shows the result. Note at (xt, yt) and its leftmost point at (xz, Yz) for some Yz,
that this stretching turns circles into ellipses. Torniello and is tangent to the straight line of slope ~ that passes
would have had considerable difficulty trying to specify through (xc, Yc), given the values of xt, Yt, xz, o, xc,
such a shape in terms of strictly circular arcs; we are and Yc? (The ellipse in question is supposed to have the
reminded of the early astronomers who found it very coordinate axes as its major and minor axes; in other
cumbersome to use circles instead of ellipses as models words, it should have left-right symmetry.) The reason
of planetary orbits. for my posing this problem should be fairly clear from
118
our previous discussion: We know a point t h a t is sup- Before a t t e m p t i n g to solve equations (,), I would
posed to be the top of the S curve, and we also know like to introduce a notation t h a t has t u r n e d out to
how far the curve should extend to the left; further- be extremely useful in my work on m a t h e m a t i c a l font
more we have a straight line in mind t h a t will form the design: Let a[x, y] be an abbreviation for
middle link of the stroke.
T h e problem stated in the preceding p a r a g r a p h is x -F a(y - - x),
interesting to me for several reasons. In the first place,
which m a y be understood as "the fraction a of the way
it has a nice answer (as we will see). In the second place,
from x to y". Thus O[x,y] = x; l[x,y] = y; 89
the answer does in fact lead to satisfactory S curves.
is the midpoint between z and y; ~ [x, y] is halfway be-
In the third place, the answer isn't completely trivial;
during a period of two years or so I came across this tween y and this midpoint; and 2Ix, y] lies on the op-
problem four different times and each time I was unable posite side of y from x, at the same distance as y is from
x. Identities like a[x, x] = x and a[x, y] = (1 - - a)[y, z]
to find m y notes about how to solve it, so I spent several
hours deriving and rederiving the formulas whenever I are easily derived. W h e n making some geometric con-
needed them. Finally I decided to write this paper so struction it is c o m m o n to refer to things like the point
one third of the way from A to B; the n o t a t i o n 1 [A, B]
t h a t I w o u l d n ' t have to derive the answer again.
means just that.
One of the uses of this bracket n o t a t i o n is to find
(zt, yt) the intersection (z, y) of two given lines, where the lines
go respectively from r Yl) to (x2, Y2) and from r Y3)
to r Y4). We can solve the intersection problem by
noting t h a t there is some n u m b e r a such t h a t

## = a [ X l , Z2], y = a[yl, Y2]

(Xl, Yl) 9 (zt, Yt)
and some n u m b e r 3 such t h a t

## x = 3[x3, x4], y = 3[y3, Y41.

r Y)
These four simultaneous linear equations in x, y, a, /3
are easily solved; and in fact METAgONT will automati-
cally solve simultaneous linear equations, so it is easy to
c o m p u t e the intersection of lines in METAI:=ONT pro-
Fig. 7. Problem: Find x, y, and yz when xt, Yt, xz, o, x~, grams.
and y~ are given. The bracket notation also applies to ellipses in an
interesting way. W e can write x = a[xo, Xmax] and
Y = ~[Yo, Ymax] in the general equation
The point (xt, yz) is the center of the ellipse we
seek. L e t (x, y) be the point where the desired ellipse is 1,
t a n g e n t to the line of slope o t h r o u g h (z~, y~), as shown X m a x - Xo.] Y -vo /
in Fig. 7. Our problem boils down to solving three
equations in the three u n k n o w n s x, y, and Yl: reducing it to the much simpler equation

a 2 -[- 3 2 = 1.
X - - Xt 2 -~2
R e t u r n i n g to our problem of the ellipse, let us set
yc - - y
--O; (,) x = a c t , ~t], y = 3[yz, yt],
Xc -- X
X = x - - xt, Y ~ Yl - - Yt,

( Yt--Yl
xz--xt/
z--xt
y--yz
__o. a = xl - - xt, b = (Yc - - axe) - - (Yt - - OXt).

## The three equations (,) car, now be rewritten as follows:

The first of these is the s t a n d a r d equation for an ellipse,
and the second is the s t a n d a r d equation for a line; the a 2 @ 3 2 = 1;
third is obtained by differentiating the first, b z r- o X -~ (1 - - fi)Y; (**)
a Y ~ aofl;
x - - zt Y-- Y~ - - O,
2 dx (xz - - xt) 2 zr- 2 dy (Yt - - Yl) 2 X=-aa.
This gives us four equations in the four u n k n o w n s
and setting d y / d x equal to o. (a, 3, X , Y), so it m a y seem t h a t we have taken a step
119
backwards; but the equations are much simpler in form. MACSYMA tO solve the system of four equations (**)
We can eliminate a to reduce back to three unknowns: was essentially the same as to deal with (1), (2), (3).
X 2 -~- a2~ 2 = a2; (1) But when I asked MACSYMA to solve the three original
equations (.) for z, y, and Yt, the computer's m e m o r y
b @ o X = (1 --/3)Y; (2) capacity was exceeded after about a minute and twenty
XY = a2o5. (3) seconds, even when I simplified (,) by replacing (xc, yc)
by (xt, y,~). Thus, I was reassured to find t h a t the equa-
Multiplying (3) by (1 - - fl) and applying (2) now leads
tions (,) aren't completely trivial and t h a t the conver-
to sion to (**) was an important step.
X ( b Jr- o X ) = a2ofl(1 --/3),
The above solution to the ellipse problem leads
and this miraculously combines with (1) to yield immediately to the desired S curves, since we can fill in
the space between an ellipse-and-straight-line are that
5x = a2o(9 - 1). (4) runs from (xt, Yt) to (xl 1), yl 1)) to (x (1), y(1)) to (Zc, y~'))
It follows t h a t (a2o(fl - - 1)) 2 -4- a2b2/32 = a2b2, i.e., and another t h a t runs from (xt, Yt) to (xl 2), yl 2)) to
(z(2), y(2)) to (xc, y~2!), where the distance between 2;I1)
a2(fl - - i)(a2o2(fl - - 1) + b2(~ + 1)) = 0. (5)
and xl 2) is governed by the desired thickness of the
If a = 0, our equations become degenerate, with stroke at the left and the distance between//!1) and y~2)
infinitely m a n y solutions (X, Y) = (0, b/(1 - - fl)) for is governed by the desired thickness of the stroke at the
--1 _< fl < 1. If b = 0, another degenerate situa- center. (See Fig. 8. The actual S curve is drawn with
tion occurs, with no solution possible unless ao = 0, in a circular pen of small but positive radius whose center
which case there are infinitely m a n y solutions with Y traces the curves shown, so the actual b o u n d a r y is not
arbitrary and (X, a, fl) = (0, 0, 1). Otherwise it is not a perfect ellipse.) The b o t t o m right p a r t of the S is, of
difficult to see t h a t fl ~ 1, so (5) determines the value course, handled in the same way as the upper left part.
of fl uniquely, and we can use this with (4) to determine
the full solution:
a = - - 2 a 5 o / ( 1 2 o 2 -[- 52);
(xt, yt)
/3 ~ (a2o 2 - - 52)/(1202 @ 52); (6)
X ~- - - 2 a 2 b 0 / ( a 2 0 2 @ b2);
Y = (b 2 - - a2o2)/2b.
I was surprised to find t h a t the simultaneous quadratic
equations (**) have purely rational expressions as their
roots. There is a curious similarity between this solu-
tion and the answer to the problem in Fig. 2.
Translating (6) back into the notation of the
original problem statement (Fig. 7), let (xt, y ~ ) be on
the line of slope o through (xc, Yc), so t h a t Y m
Yc + o ( z t - - zc). Then the unique solution is
(z(~),
X -~- Xt At- 20(Zl- Zt)2(yt - - Ym)
o2(zz -- z t ) 2 + (yt - - y . j 2 '
Fig. 8. A good S is obtained by drawing two partial ellipses
2 o 2 ( x t - Zt)2(yt - - Ym)
according to the method of Fig. 7, then filling in the space
Y = Ym + o2(x z _ xt)2 + (Yt - - y~)2' (7) between them, using a pen whose diameter is the width of
(y~ - ym) ~ - o2(zl - z~) 2 the "hairlines" of the desired letters.
Yl = Yt - - 2(yt - - Ym) '

## except in the degenerate cases xz = zt or Ym = Yr.

Incidentally, I tried the automatic equation-
solving feature of the MACSYMA computer algebra
system [5,7] on this problem, in order to get some
idea of how long it will be before mathematicians
will be replaced by computers when such calculations
are required. MACSYMA correctly found the solution
SSSSSSS
Fig. 9. Different possibilities can be explored by varying the
(X, Y,/3) for equations (1), (2), (3) in about 17 seconds, parameters. Here the slope is changing, but other charac-
except t h a t it said nothing about the degenerate solu- teristics are held fixed; the respective slopes are ~,
5 89 ~,
3 1,
tions t h a t occur when ab = O. The time required for a,
2 2, and ~ times the "correct" slope in the middle.
120
Fig. 9 shows various S curves drawn by this I happily made S's with this method for more than
method when the slope o varies but the other specifi- two years, but one day I decided to ask METAI=ONT
cations stay the same. Fig. 10 shows an S that has the to draw a great big letter S and the resulting shape
same slope as the middle one of Fig. 9, but the curve was unexpectedly ugly. Looking back at some of the
is wider when it is travelling vertically at the upper other supposedly nice S's drawn previously, I started
left and the lower right. One of the chief advantages to notice an occasional defect that was comparatively
of a mathematical, parameterized approach is that it innocuous at the small scales I had been working with.
is easy to make lots of experiments until you find the This defect became painfully apparent when everything
setting of parameters that you like best. A METAFONT was enlarged, so I realized that I still hadn't gotten to
program that would draw the S's in Figs. 9 and 10, the end of the story.
depending on appropriate parameters, appears in the Fig. 11 illustrates this new difficulty in a some-
appendix below. what extreme form. In terms of the notation of Fig. 8,
I had not placed x z sufficiently far to the right of z z ,
so the two ellipses through (x?), yl 1)) and (x?), y ? ))
actually crossed each other. This made the supposed
inner boundary switch over and become the outer
boundary and vice versa, a distinctly unpleasant result
since I was not intending to have such a calligraphic
effect in this case.
The problem of Fig. 11 goes away if x ? ) is
sufficiently large, but of course it is desirable to know
what the permissible values are. We are led to a
third (and final) problem concerning ellipses: W h a t is a
necessary a n d sufficient condition t h a t the elliptical arc
f r o m (x?), y ? ) ) to (xt, Yt) stays above the elliptical arc
from (x?), y ? ) ) to (xt, Yt)? (We are assuming t h a t
X? ) < X? ) < Zt and y?) < y?) < Yt, and that both
ellipses have left/right symmetry as before.) It turns
out that the answer to this problem can be expressed
quite simply: the curves fail to cross if and only if

Yt - - y}l) Yt - - Y?)
Fig. 10. The main stroke of this S is wider at the upper %- xll)) 2 >
- ( x t - x?))2 (s)
left and lower right, but otherwise it was drawn to the
specifications of the middle S in Fig. 9.
My first attempt to find the right condition got
bogged down in a notational mess, but finally I hit on
the following fairly simple solution to this problem: Let
a = Xt X? ), b = Y t - Y?)' A = z t - - x ? ), and
- -

## B = Yt - - Y?)' By turning the curves upside down, we

want the function b - - bv/1 - - (x - - a) 2 (which describes
the bottom right quarter of an elliptical are from (0, 0)
to (a, b)) to be less than or equal to the analogous
function B - - BV/1 - - (x - - A) 2, whenever Izl < a.
Expanding in power series we have

b -- bx/1--
y
(x/a) 2 =

Z X4 @ {'1/2"~( l)k_(1z2k )
b kk)- '

where

(1s = ( 2 k - - 2),
2 2k-1 k! (k - - 1)!

Fig. 11. Disastrous effects can occur if there isn't enough is positive for all k > 0, and the power series converges
width at the upper left and lower right. for Ixl < a. If b / a 2 < B / A 2, the analogous power
121
After learning how to draw an S with mathemati-
cal precision, I found t h a t the same ideas apply to many
other symbols needed in a complete system of fonts for
mathematics. In fact, all of the characters in Fig. 13
use the same METAFONT subroutine t h a t I first devel-
Fig. 12. Varying thicknesses of the middle stroke lead to
oped for the letter S (or the dual subroutine obtained
these S's, where the width at upper left and lower right
has been chosen to be as small as possible without the by interchanging x and y coordinates). Without the
"crossover" problem of Fig. 11. theory developed in this paper, I would either have had
to abandon my goal of defining books in a mathemati-
cal way or I would have had to stop using all of these
characters.
series Of course, this is only a first step; the letters I have
designed are far from optimal, and dozens of future
B - By~1 - = experiments suggest themselves. My current dream
is that the next several years will see mathematicians
x x4 /1/2"~ 1 k + l x2k )
B ) '
teaming up with experienced type designers to create
truly beautiful new fonts. This will surely be one of the
most visible applications of mathematics!
will grow faster for small x and the two curves will cross. Let me close by asking a question of the reader.
But if b/a 2 > B / A 2, we will have b/a 2k >_ B / a 2k for all Ellipses have been studied for thousands of years, so
k > 0, so every term of the first power series dominates it is reasonable to assume that all of their interesting
every term of the second. Q.E.D. properties were discovered long ago. Yet my experience
According to the theory worked out earlier, we is that when mathematics is applied to a new field,
have new 'purely mathematical' questions are often raised
that enrich mathematics itself. So I am most curious
(7 2
Yt--Yz Yt--Ym (9) to know: Have the questions t h a t I encountered while
2(z -zz) 2(yt-y )" trying to draw S-like ellipses been studied before, per-
haps in some other disguise? Or did the new application
Thus we can ensure that (Yt -- Yll))/(xt -- xll)) 2 is ac- of mathematics to typography lead to fresh insights
tually equal to (Yt -- Yl2))/(xt -- x12))2 by starting with about even such a well-studied object as a rectilinear
desired values of xt, Yt, xl 2), Y~), and y~): first yl 2) is ellipse?
determined, then xl 1), and finally yl 1).

## Fig. 13. The method used to draw an S stroke also is used

as a subroutine that draws parts of many other characters, Fig. 14. The labeled points in this S correspond to the num-
including those shown here. bers specified by the MI=TAFONT routine in the appendix.
122
Appendix "The letter S";
hpen; topoYl ~ round(h q- o); botoy5 -~ --o;
The METAFONT code below will draw the S shown in x3----5u; y 3 ~ . 5 2 h ;
Fig. 14 (and infinitely m a n y others) when the following lftsx2 --~ round u; rtsx4 ---- round 9u;
xl : 4.5u; xs ~ 5.5u;
p a r a m e t e r s have been specified:
lftox6 ~- round u; rtox7 ---- round 8.5u;
h, height of the character; y6~goodo 89 YT~goodo~hJrl;
botoys z 0; y9 ~ y6; xs ~---x6; rt4x6 ~ rtoxg;
o, "overshoot" of curved lines at top and b o t t o m ; t o P o Y l o ~ h ; Ylt----YT; xto----x% lft4X7 ---- lft0Xll;
u, one tenth of the character width; w0ddraw6..8,9..8; ~o lower serif
Wo, size of circular pen used in drawing lines; ddraw 7.. 10, 11.. 10; % upper serif
rpen#; w4 draw 6{0,--1}..5{1,0}; ~o erase excess
w4, width of triangular serifs before erasing;
lpen#; w4 draw 7 { 0 , 1 ) . . 1 { - - 1 , 0 } ; % ditto
Ws, thickness of S stroke in the middle; hpen; Wo draw 6{0,--1}..5{1,0}; % lower left stroke
Wg, thickness at the upper left and lower right. draw 7{0, 1}.. 1{--1,0}; % upper right stroke
call "a sdraw(1, 2, 3, 4, 5, 8, 9, --h/(5Ou)). % middle stroke
The vertical lines in Fig. 14 are u steps apart. The
p r o g r a m uses "lpen#" and "rpen#" to erase u n w a n t e d
ink t h a t lies to the left and right of a specified path;
the effect of such erasure is visible in the illustration,
References
since portions of the guidelines have been erased.

## 1. Richard J. Fateman, Essays in Algebraic

Simplification, Ph.D. thesis, Harvard University, April
subroutine scomp(index i) % starting point
1971; also MAC TR 95, April 1972. Available from
(indexp) % turning point (yv to be defined)
MIT Laboratory for Computer Science, Publications,
(index j) % transition point (to be defined)
Room 112, 545 Technology Square, Cambridge MA
(index k) % ending point
02139.
(vars): % ending slope
2. Donald E. Knuth, Mathematical Typography, Bull.
% This subroutine computes yp, x j, and Y3 so that
Amer. Math. Soc. (new series) 1 (1979), 337-372.
% yk - - Yj -= s.(xk - - x j) and so that the following curve
Reprinted with corrections as part 1 of .
% is consistent with an ellipse:
% i{zv - - z~, 0 } . . p{0, yp - - y ~ } . . j { z k - - z~, s.(x~ - - xp)}.
3. Donald E. Knuth, TEX and M E T A F O N T : N e w
Directions in Typesetting (Providence, R.I.: American
Yk - - Yj ~- s(xk - - xj); Mathematical Society, and Bedford, Mass.: Digital
newa, b; a : s ( x v - xi); b ---- yk - - y ~ - - s(xk - - xi); Press, 1979).
Xj - - X~ ----- --2a.b(xp - - xi)/(a.a Jr- b.b);
4. Giovanni Mardersteig, The alphabet of Francesco
yp - - y~ : .5(b.b - - a.a)/b.
Torniello (1517) da Novara (Verona: Officina Bodoni,
1971).
5. The Mathlab Group, M A C S Y M A Reference Manual,
subroutine sdraw(index i) % starting point version nine, 1977. Available from MIT Laboratory
(indexp) % upper turning point (yp to be defined) for Computer Science, Mathlab Group, Room 828,
(index k) % middle point 545 Technology Square, Cambridge MA 02139. The
(index q) % lower turning point (yq to be defined) original design and implementation of MACSYMA's
(index j) % ending point "SOLVE" operator was due to R. J. Fateman, and it is
(index a) % effective pen width at turning points briefly described in w of .
(index b) % effective pen height at middle point 6. H. W. Mergler and P. M. Vargo, "One approach
(vars): ~o slope at middle point to computer-assisted letter design," J. Typographic
epen; toP6Y~~ topbyk; bot6y6 ~ botbyk; Research 2 (1968), 299-322. [This paper describes the
Z5 ~ Z6 ~ Zk; first computer system for drawing parameterized let-
rtaXp ~-- rtoxl; lftaXp ~ lftoX2; ters; for reasons that are now clear, the authors were
rtaXq ~ rtox9; lftaXq ~-- lft0Xlo; unable to obtain a satisfactory 'S'!]
y 2 ~ - y v ; yg ---- yq; 7. Joel Moses, MACSYMA--The Fifth Year, Proc.
call scomp(i, 1, 3, 5, s); % compute yl and point 3 E U R O S A M '74, Royal Inst. of Tech., Stockholm;
call scomp(i, 2, 4, 6, s); % compute y2 and point 4 S I G S A M Bulletin 8,3 (Association for Computing
call s c o m p ( j , 9, 7, 5, s); % compute y9 and point 7 Machinery, 1974), 105 110.
call s c o m p ( j , 10, 8, 6, s); % compute ylo and point 8
hpen; w0 ddraw i { x t - - x~, 0}.. 1{0, yt - - yi}..
3 { X q - - Xp, S(Xq-- xp)}..7{Xq-- Xp, S(Xq-- xv)}..
9{0, y~ - yg}.. j{x~ - xg, 0},
i { x 2 - - xi, O } . . 2 { 0 , y 2 - - y~}.. D e p a r t m e n t of C o m p u t e r Science
4{xq - z~, s ( z q - z , ) } . . 8{z~ - x~, s(x~ - z~)}.. Stanford University
10{0, Y3 - - yl0} 99j { x j -- Xl0, 0}. ~O the s-curve Stanford, California, USA