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 hotlead 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 [2] 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 MCS7723738 and IST7921977, by fourteen points on the boundary of the letter,
Office of Naval Research grant N0001476C0330, 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 halfcircle 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 zcoordinate (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 zcoordinate 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 rulerandcompass
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 halfcircle. 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;
x26u; y25.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 ; 7uy7 =
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 
add the commands
sqrt(u.u  (3;11   x 1 6 ) ( 3 ; 1 1   3 : 1 6 ) ) ;

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
{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 leftright 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 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,
( YtYl
xzxt/
zxt
yyz
__o. a = xl   xt, b = (Yc   axe)   (Yt   OXt).
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  bx/1
y
(x/a) 2 =
Z X4 @ {'1/2"~( l)k_(1z2k )
b kk) '
where
(1s = ( 2 k   2),
2 2k1 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
YtYz YtYm (9) to know: Have the questions t h a t I encountered while
2(z zz) 2(yty )" trying to draw Slike 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 wellstudied 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).