Sunday, March 3, 2019

Republishing the Petri Net book, Fonts

The font information is defined by the book's style sheet.  A skilled book designer at Prentice-Hall sat down and decided what the book would look like.  This involved deciding all sorts of things:

1. The page size of the book: 6 inches by 9 inches.
2. The size of the margins and the resulting size of the printed page.
3. What the running heads and page numbers look like.
4. The fonts and sizes for the various parts.

Normal text is 10 point Times Roman.
Figure captions are 8 point.
The Bibliography is 9 point.
Running heads are 8 point.
Page numbers are 8 point bold.
Chapter titles are 18 point Modula
Section titles are 11 point Times Roman bold
Subsection titles are 10 point Bold
Subsection titles are 10 point Bold Italic

The Chapter titles may or may not be 18 point.  The book design says the chapter numbers are 1/4 inch high, which at 72 points per inch would make them 18 point.  The Titles are supposed to be 1/8 inch high, which would be 9 point, but clearly are not.

Partly this is a question of what is supposed to be 1/8 inch high?  The capital letters? or the lower-case letters?  And which of them?  All capital letters (except Q), and all digits (0-9) are the same height in our fonts.  For lower-case letters, you have those with ascenders (bdfhkl) which should be the same height as capital letters and digits. Characters with descenders (gpqy) should be the same height as characters with ascenders  (but shifted down on the line, of course).  The compact lower-case letters with neither ascenders or descenders (cemnorsuvwxz) are shorter than the others.  And then the remaining characters (aijt) are just different.  And for a particular design, other characters may also be "different".  For example 'a' is sometimes a variant of an 'o' and other times more like an upside down '9'. The design of 'g' and 'q' may also vary significantly.

And then the italic and bold forms may also be different.

But if we stick with the height of digits and (most) capital letters, then it seems that our most common text, which is supposed to be set as 10 point, is about 60 dots high.  At 600 dpi, that would be 6 dots per point.  So our Chapter numbers are, empirically, from 160 to 168 dots high, or about 27 points, while the chapter titles (measuring the height of the capital letters) are 112 or 113 dots high, or about 18 points.

Note that it does not really matter what we call the font used for our Chapter titles -- we can call it 17 points or 18 points or 19 points -- as long as we use the same name for all characters of the same height (and same font family and font face).  We are going to reproduce the original characters just as they are in the printed book.  Although it would be nice if we used the same names/sizes as in the book design document.

So empirically, we have:

11 point -- Section heading numbers, titles
10 point -- normal text, section, subsection titles
 9 point -- bibliography
 8 point -- figure captions, page numbers, running heads, sub/superscripts for normal text.
 7 point -- All caps tags for DEFINITIONS, THEOREMS, LEMMAS, sub/superscripts for bibliography or figure captions
 6 point -- second level sub/superscripts

Actually we are having some difficulty with superscripts and subscripts.  None of the book design documents say what they should be.  Other documents suggest that for a 10 point text, a subscript should be 7 point and then a second level subscript should be 5 point.  But our smallest second level subscripts seem more like 6 point, so we suspect that subscripts (and superscripts) should be 8 point.

One way to try to determine this is to look at the actual characters on the page.  On page 23, for example, we have superscripts of 0, 1, and 2 (last paragraph) which are 43 or 44 dots high, which (at 6 dots per point) would be 7 point.  There are also second level subscripts of 0, 1, and 2 which are 37 dots, or 6 points. So this example suggests that for 10 point text, subscripts should be 7 point, and second level subscripts should be 6 point.

Our current approach is to build an ideal image of a particular character  (for a given point size, font family, and font face) by averaging together all the bits of all the instances of that character that we have.  So we take all the 8 point, italic, Times Roman instances of "e" and average them together.  Since we have 730 instances of these,  the law of large numbers suggests that errors or deviations in a few of those will not matter.  (And we will review and edit the fonts produced anyway.)

But to check, after we have defined our ideal 8 point italic Times Roman "e", we run back over all 730 of the specific instances and compute the difference between the specific instance and the ideal, looking for any large differences.  A large difference suggests that that particular specific instance may be something other than a 8 point italic Times Roman "e" -- it might be a different size, or different font face.  In fact we also check to see if that specific "e" might match a different point size closer than it does the assigned point size.

This approach fixes most of our issues, but also exposes that the printed book is highly analog.  Many characters are "broken".



Other characters are the wrong size.  For example, the subscript 'j' in the Index for "Maximal tj-dead submarkings"  (page 284) should be a 7 point italic j, but for all appearances is a 10 point italic j.  The horizontal ellipsis in the caption for Figure 8.10  should be 8 point, but empirically is 10 point (as are the commas before and after it).  The text at the top of pages 268 and 274 is the wrong point size (should be 9 point not 10 point) and with the wrong margins. 


No comments:

Post a Comment