302  INTRODUCTION  PLTOTF changes for C §1

1* . Introduction. The utility program converts property-list (“ ”) files into equivalent TEX font metric (“ ”) files. It also makes a thorough check of the given file, so that the file should be acceptable to TEX.

The first program was designed by Leo Guibas in the summer of 1978. Contributions by Frank Liang, Doug Wyatt, and Lyle Ramshaw also had a significant effect on the evolution of the present code.

Extensions for an enhanced ligature mechanism were added by the author in 1989. The banner string defined here should be changed whenever gets modified. define banner ≡ ´ ␣ ␣ ␣ ␣ ␣ ´ { printed when the program starts }

2* . This program is written entirely in standard Pascal, except that it has to do some slightly systemdependent character code conversion on input. Furthermore, lower case letters are used in error messages; they could be converted to upper case if necessary. The input is read from pl file, and the output is written on tfm file; error messages and other remarks are written on the output file, which the user may choose to assign to the terminal if the system permits it.

The term print is used instead of write when this program writes on the output file, so that all such output can be easily deflected.

define print (#) ≡ write(#) define print ln(#) ≡ write ln(#)

program PLtoTF ; const ⟨ Constants in the outer block 3* ⟩ type ⟨ Types in the outer block 17 ⟩ var ⟨ Globals in the outer block 5 ⟩ procedure initialize; { this procedure gets things started properly }

var ⟨ Local variables for initialization 19 ⟩ begin print ln(banner ); ⟨ Set initial values 6* ⟩ end;

3* . The following parameters can be changed at compile time to extend or reduce ’s capacity. ⟨ Constants in the outer block 3* ⟩ ≡

buf size = 60; { length of lines displayed in error messages } max header bytes = 100; { four times the maximum number of words allowed in the file header

block, must be 1024 or less } max param words = 30; { the maximum number of parameters allowed } max lig steps = 5000; { maximum length of ligature program, must be at most 32767 − 257 = 32510 } max kerns = 10000; { the maximum number of distinct kern values } hash size = 15077;

{ preferably a prime number, a bit larger than the number of character pairs in lig/kern steps }

This code is used in section 2*.

§5  PLTOTF changes for C  PROPERTY LIST DESCRIPTION OF FONT METRIC DATA 303

6* . ⟨ Set initial values 6* ⟩ ≡

if argc < 3 then begin print ln(´ ␣ ␣ ␣ ␣ ␣ ␣ ´ ); uexit (1); end;

argv (1, pl name); reset (pl file, pl name);

See also sections 16*, 20, 22, 24, 26, 37, 41, 70, 74, and 119. This code is used in section 2*.

15* . So that is what files hold. The next question is, “What about files?” A complete answer to that question appears in the documentation of the companion program, , so it will not be repeated here. Suffice it to say that a file stores all of the relevant font information in a sequence of 8-bit bytes. The number of bytes is always a multiple of 4, so we could regard the file as a sequence of 32-bit words; but TEX uses the byte interpretation, and so does . Note that the bytes are considered to be unsigned numbers. ⟨ Globals in the outer block 5 ⟩ +≡ tfm file: packed file of 0 . . 255; tfm name, pl name: packed array [1 . . 100] of char ;

16* . On some systems you may have to do something special to write a packed file of bytes with Pascal. It’s no problem in C. ⟨ Set initial values 6* ⟩ +≡

argv (2, tfm name); rewrite(tfm file, tfm name);

304  THE CHECKING AND MASSAGING PHASE  PLTOTF changes for C §17

115* . define round message(#) ≡

if delta > 0 then begin print (´ ␣ ␣ ␣ ␣ ␣´ , #, ´ ␣ ␣´ ); print real ((((delta + 1) div 2)/´ 4000000 ), 1, 7); print ln(´ ␣ ´ ); end

⟨ Put the width, height, depth, and italic lists into final form 115* ⟩ ≡ delta ← shorten(width, 255); set indices (width, delta); round message(´ ´ ); delta ← shorten(height , 15); set indices (height , delta); round message(´ ´ ); delta ← shorten(depth, 15); set indices (depth, delta); round message(´ ´ ); delta ← shorten(italic, 63); set indices (italic, delta); round message(´ ␣ ´ );

This code is used in section 110.

123* . (More good stuff from .)

ifdef (´ ´ ) function f(h, x, y : indx ): indx ;

begin end;

{ compute f for arguments known to be in hash[h] } endif (´ ´ ) function eval (x, y : indx ): indx ; { compute f(x, y) with hashtable lookup }

var key : integer ; { value sought in hash table } begin key ← 256 ∗ x + y + 1; h ← (1009 ∗ key ) mod hash size; while hash[h] > key do

if h > 0 then decr (h) else h ← hash size; if hash[h] < key then eval ← y { not in ordered hash table } else eval ← f(h, x, y); end;

124* . Pascal’s beastly convention for forward declarations prevents us from saying function f(h, x, y : indx ): indx here. function f(h, x, y : indx ): indx ;

begin case class [h] of simple: do nothing ; left z : begin class [h] ← pending ; lig z [h] ← eval (lig z [h], y); class [h] ← simple;

end; right z : begin class [h] ← pending ; lig z [h] ← eval (x, lig z [h]); class [h] ← simple;

end; both z : begin class [h] ← pending ; lig z [h] ← eval (eval (x, lig z [h]), y); class [h] ← simple;

end; pending : begin x lig cycle ← x; y lig cycle ← y; lig z [h] ← 257; class [h] ← simple;

end; { the value 257 will break all cycles, since it’s not in hash } end; { there are no other cases } f ← lig z [h]; end;

§127  PLTOTF changes for C  THE OUTPUT PHASE 305

127* . The output phase. Now that we know how to get all of the font data correctly stored in ’s memory, it only remains to write the answers out.

First of all, it is convenient to have an abbreviation for output to the file: define out (#) ≡ putbyte(#, tfm file)

136* . When a scaled quantity is output, we may need to divide it by design units . The following subroutine takes care of this, using floating point arithmetic only if design units ≠ 1.0. procedure out scaled (x : fix word ); { outputs a scaled fix word }

var n: byte; { the first byte after the sign }

m: 0 . . 65535; { the two least significant bytes } begin if fabs (x/design units ) ≥ 16.0 then

begin print (´ ␣ ␣ ␣´ ); print real (x/´ 4000000 , 1, 3); print ln(´ ␣ ␣ ␣ ´ ); print (´ ␣␣ ␣ ␣ ␣ ␣ ´ ); if design units ≠ unity then

begin print (´ ␣ ´ ); print real (design units /´ 200000 , 1, 3); print (´ ␣ ´ ); end;

print ln(´ ´ ); x ← 0;

end; if design units ≠ unity then x ← round ((x/design units ) ∗ 1048576.0); if x < 0 then

begin out (255); x ← x + ´ 100000000 ;

end else out (0); n ← x div ´ 200000 ; m ← x mod ´ 200000 ; out (n); out (m div 256); out (m mod 256); end;

140* . ⟨ Insert all labels into label table 140* ⟩ ≡ label ptr ← 0; label table[0].rr ← −1; { sentinel } for c ← bc to ec do

if char tag [c] = lig tag then begin sort ptr ← label ptr ; { there’s a hole at position sort ptr + 1 } while label table[sort ptr ].rr > toint (char remainder [c]) do

begin label table[sort ptr + 1] ← label table[sort ptr ]; decr (sort ptr ); { move the hole } end;

label table[sort ptr + 1].cc ← c; label table[sort ptr + 1].rr ← char remainder [c]; incr (label ptr ); end

This code is used in section 139.

306  INDEX  PLTOTF changes for C §149

149* . Index. Pointers to error messages appear here together with the section numbers where each identifier is used.

The following sections were changed by the change file: 1, 2, 3, 6, 15, 16, 115, 123, 124, 127, 136, 140, 149.

: 113. acc: \underline{51}, 52, 53, 54, 55, 56, \underline{62}, 64, 66. : 62. : 59. argc: 6* . argv : 6* , 16* . ASCII code: \underline{17}, 18, 30, 36, 38, 51. : 105. backup: \underline{32}, 53, 54, 55, 97. bad indent : \underline{29}. banner : \underline{1*} , 2* . bc: \underline{129}, 130, 131, 134, 135, 140* . bchar : \underline{67}, 70, 85, 120, 125, 126, 138, 139, 142. bchar label : \underline{72}, 74, 97, 110, 116, 125, 139. boolean: 23, 42, 62, 67, 98, 109, 121, 129, 138. : 112. both z : \underline{117}, 121, 122, 124* . boundary char code: \underline{44}, 47, 85. buf size: \underline{3*} , 23, 27, 28. buffer : \underline{23}, 27, 28, 29, 31, 32, 33, 52. byte: \underline{17}, 44, 45, 51, 57, 67, 72, 73, 79, 80, 81,

87, 96, 107, 129, 136* , 138, 146. b0 : \underline{57}, 58, 99, 100, 101, 102, 105, 106, 112, 116,

120, 126, 142, 143. b1 : \underline{57}, 58, 101, 102, 105, 106, 112, 116, 120,

122, 126, 142, 143. b2 : \underline{57}, 58, 101, 102, 105, 106, 112, 116, 120,

122, 126, 139, 142, 143. b3 : \underline{57}, 58, 101, 102, 105, 106, 112, 116, 120,

122, 126, 139, 142, 143. c: \underline{59}, \underline{73}, \underline{81}, \underline{121}, \underline{146}. : 52. cc: \underline{121}, 122, \underline{138}, 140* , 141. char : 15* , 18, 23. char dp: \underline{72}, 74, 104, 135. char dp code: \underline{44}, 47, 104. char ht : \underline{72}, 74, 104, 135. char ht code: \underline{44}, 47, 104. char ic: \underline{72}, 74, 104, 135. char ic code: \underline{44}, 47, 104. char info: 135. char info code: \underline{44}. char info word : 72. char remainder : \underline{72}, 74, 97, 104, 105, 111, 112,

113, 120, 125, 135, 138, 140* , 141. char tag : \underline{72}, 74, 96, 97, 104, 105, 111, 113,

125, 135, 140* . char wd : \underline{72}, 74, 75, 103, 104, 110, 111, 126,

130, 134, 135. char wd code: \underline{44}, 47, 93, 104. character code: \underline{44}, 47, 84, 85. chars on line: \underline{25}, 26, 27, 108. check existence: \underline{111}, 120. check existence and safety : \underline{111}, 112. check sum code: \underline{44}, 47, 85. check sum loc: \underline{70}, 85, 134. check sum specified : \underline{67}, 70, 85, 133. check tag : \underline{96}, 97, 104, 105. chr : 20, 28. class : \underline{118}, 121, 124* , 125. clear lig kern entry : \underline{116}. coding scheme code: \underline{44}, 47, 85. coding scheme loc: \underline{70}, 85. comment code: \underline{44}, 47, 84, 93, 95, 104, 106. corr and check : \underline{146}, 147. cur bytes : 57, \underline{58}. cur char : \underline{30}, 31, 32, 33, 34, 35, 49, 51, 52, 53,

54, 55, 56, 59, 60, 62, 63, 64, 66, 82, 84, 87, 90, 92, 94, 97, 103, 105.

cur code: \underline{44}, 49, 84, 85, 93, 95, 101, 104, 106. cur hash: \underline{39}, 42, 43, 45. cur name: \underline{38}, 42, 43, 45, 46, 49. c0 : \underline{58}, 59, 60, 86, 134. c1 : \underline{58}, 59, 60, 86, 134. c2 : \underline{58}, 59, 60, 86, 134. c3 : \underline{58}, 59, 60, 86, 134. d: \underline{69}, \underline{75}, \underline{77}, \underline{78}, \underline{80}. decr : \underline{4}, 32, 33, 42, 49, 66, 80, 87, 92, 102, 121,

§149  PLTOTF changes for C  INDEX 307

123* , 130, 140* , 141, 142. delta: \underline{114}, 115* . depth: \underline{44}, 74, 104, 115* , 130, 131. design size: \underline{67}, 70, 88, 133. design size code: \underline{44}, 47, 85. design size loc: \underline{70}, 133. design units : \underline{67}, 70, 89, 134, 136* . design units code: \underline{44}, 47, 85. dict ptr : \underline{36}, 37, 45. dictionary : \underline{36}, 42, 45. do nothing : \underline{4}, 96, 111, 122, 124* . double check ext : \underline{126}. double check lig : \underline{126}. double check rep: \underline{126}. double check tail : \underline{126}. ec: \underline{129}, 130, 131, 134, 135, 140* . endif : 123* . enter name: \underline{45}, 46. eof : 28. eoln: 28. equiv : \underline{44}, 45, 47, 49. err print : \underline{27}, 29, 32, 33, 34, 35, 49, 75, 82, 83, 87,

88, 89, 90, 96, 99, 100, 101, 102, 105. eval : \underline{123*} , 124* . excess : 78, \underline{79}, 80. existence tail : \underline{111}. ext tag : \underline{72}, 96, 105, 111. exten: \underline{67}, 105, 106, 112, 126, 143. : 82. extra loc needed : \underline{138}, 139, 141, 142. f: \underline{123*} , \underline{124*} . fabs : 136* . face code: \underline{44}, 47, 85. face loc: \underline{70}, 85. false: 24, 28, 42, 62, 70, 90, 97, 99, 100, 110,

121, 130, 139, 141. family code: \underline{44}, 47, 85. family loc: \underline{70}, 85. : 33. fill buffer : \underline{28}, 29, 31, 32, 33. finish inner property list : \underline{92}, 94, 103, 105. finish the property : \underline{35}, 84, 92, 93, 95, 104, 106. first ord : \underline{18}, 20. fix word : \underline{61}, 62, 67, 71, 72, 75, 76, 77, 78, 80,

114, 129, 136* . flush error : \underline{34}, 84, 93, 95, 104, 106. font dimen code: \underline{44}, 47, 85. forward : 124* . four bytes : \underline{57}, 58, 59, 67. fraction digits : \underline{65}, 66. g: \underline{146}. get byte: \underline{51}, 85, 91, 93, 97, 100, 101, 102,

103, 104, 106. get fix : \underline{62}, 88, 89, 93, 102, 104. get four bytes : \underline{59}, 86. get keyword char : \underline{31}, 49. get name: \underline{49}, 84, 93, 95, 104, 106. get next : \underline{32}, 34, 35, 49, 51, 52, 53, 54, 55, 56,

59, 60, 62, 63, 64, 66, 82, 87, 90, 92, 94, 97, 103, 105.

good indent : \underline{21}, 22, 29. h: \underline{40}, \underline{75}, \underline{77}, \underline{78}, \underline{80}, \underline{118}, \underline{123*} , \underline{124*} . hash: \underline{118}, 119, 121, 123* , 124* , 125. hash input : 120, \underline{121}. hash list : \underline{118}, 121, 125, 146. hash prime: \underline{39}, 40, 41, 42, 43. hash ptr : \underline{118}, 119, 121, 125. hash size: \underline{3*} , 118, 119, 121, 123* , 125, 146. header : 9. : 91. header bytes : \underline{67}, 69, 70, 85, 86, 87, 91, 132,

133, 134. header code: \underline{44}, 47, 85. header index : 67, \underline{68}, 69, 86, 87. header ptr : \underline{67}, 70, 91, 130, 133. height : \underline{44}, 71, 74, 104, 115* , 130, 131. hh: \underline{118}, 125, \underline{146}. : 115* . ifdef : 123* . : 32. : 60. : 56. incr : \underline{4}, 28, 29, 31, 32, 33, 45, 49, 56, 66, 75,

77, 80, 82, 87, 91, 92, 93, 101, 102, 105, 108, 116, 121, 130, 140* , 141.

indent : \underline{21}, 22, 29. index : \underline{79}, 80, 135. indx : \underline{68}, 118, 121, 123* , 124* . : 125. initialize: \underline{2*} , 147. input has ended : \underline{23}, 24, 28, 33, 82. int part : \underline{62}. integer : 19, 21, 33, 51, 59, 61, 62, 65, 77, 78,

121, 123* . invalid code: \underline{20}, 32. italic: \underline{44}, 71, 74, 104, 115* , 130, 131, 132, 137. j: \underline{42}, \underline{62}, \underline{132}. : 35. junk error : 82, \underline{83}, 92, 94, 103, 105. k: \underline{19}, \underline{27}, \underline{42}, \underline{45}, \underline{78}, \underline{87}. kern: \underline{67}, 98, 102, 142, 146. kern flag : \underline{98}, 102, 120, 122, 126. key : \underline{121}, \underline{123*} . : 120. krn code: \underline{44}, 47, 95. krn ptr : \underline{98}, 102, 142, \underline{146}. l: \underline{33}, \underline{77}, \underline{80}. label code: \underline{44}, 47, 95. label ptr : \underline{138}, 140* , 141, 142. label table: \underline{138}, 140* , 141, 142. last ord : \underline{18}, 20. left ln: \underline{23}, 24, 27, 28. left z : \underline{117}, 122, 124* . level : \underline{21}, 22, 29, 33, 49, 92, 94, 103, 105. lf : \underline{129}, 130, 131. lh: \underline{129}, 130, 131. : 120. : 120. lig code: \underline{44}, 47, 95, 101. lig exam: \underline{120}. lig gen: \underline{120}. lig kern: \underline{67}, 99, 100, 101, 102, 116, 118, 120,

122, 126, 139, 142, 146. lig ptr : \underline{118}, 120, 126, 142, \underline{146}. lig table code: \underline{44}, 47, 85. lig tag : \underline{72}, 96, 97, 111, 125, 140* . lig z : \underline{118}, 121, 124* . limit : \underline{23}, 24, 27, 28, 29, 31, 32, 33. line: \underline{21}, 22, 27, 28. link : 71, \underline{72}, 74, 75, 77, 80, 137. list tag : \underline{72}, 96, 104, 111, 113. lk offset : 130, 131, \underline{138}, 139, 141, 142. lk step ended : 97, \underline{98}, 99, 100, 101, 102. load10 : \underline{46}, 47, 48. load11 : \underline{46}, 47. load12 : \underline{46}, 47. load13 : \underline{46}, 48. load14 : \underline{46}. load15 : \underline{46}. load16 : \underline{46}, 47. load17 : \underline{46}. load18 : \underline{46}. load19 : \underline{46}. load20 : \underline{46}, 48. load3 : \underline{46}, 47. load4 : \underline{46}, 47, 48. load5 : \underline{46}, 47, 48. load6 : \underline{46}, 47, 48. load7 : \underline{46}, 47, 48. load8 : \underline{46}, 47. load9 : \underline{46}, 47. loc: \underline{23}, 24, 27, 28, 29, 31, 32, 33, 49, 52, 82, 92. longest name: \underline{38}, 42, 45, 49. lookup: \underline{42}, 45, 49. m: \underline{77}, \underline{80}, \underline{136*} . max header bytes : \underline{3*} , 9, 68, 91, 132. max kerns : \underline{3*} , 67, 98, 102, 146. max letters : \underline{36}, 42. max lig steps : \underline{3*} , 67, 100, 101, 102, 118, 146. max name index : \underline{36}, 38, 39, 44. max param words : \underline{3*} , 11, 67, 93, 132. : 100. mem ptr : \underline{72}, 74, 75. mem size: \underline{71}, 75. memory : 71, \underline{72}, 74, 75, 77, 78, 79, 80, 129, 130,

131, 132, 134, 137. : 75. : 112. min cover : \underline{77}, 78. min nl : \underline{67}, 70, 97, 100, 116. n: \underline{136*} . name enter : \underline{146}, 147. name length: \underline{38}, 42, 43, 45, 46, 49. name ptr : \underline{38}, 42, 49. ne: \underline{67}, 70, 105, 106, 126, 130, 131, 143. negative: \underline{62}, 63.

next d : \underline{76}, 77, 78, 88, 89.
next larger code: \underline{44}, 47, 104.
nhash: \underline{39}, 41, 42, 45.
nk : \underline{67}, 70, 102, 130, 131, 142.
nl : \underline{67}, 70, 97, 99, 100, 101, 102, 110, 116, 120,

125, 126, 130, 131, 139, 142. no tag : \underline{72}, 74, 96, 111, 113, 125. not found : \underline{42}, \underline{129}, 130. np: \underline{67}, 70, 93, 130, 131, 144. out : \underline{127*} , 131, 133, 135, 136* , 137, 142, 143, 145. out scaled : \underline{136*} , 137, 142, 144. out size: \underline{131}, 142. output : 2* . p: \underline{75}, \underline{77}, \underline{80}, \underline{121}, \underline{132}. par ptr : \underline{132}, 144. param: \underline{67}, 93, 144, 145. param enter : \underline{146}. : 93. parameter code: \underline{44}, 47, 48, 93. pending : \underline{117}, 118, 124* . pl file: 2* , \underline{5}, 6* , 28. pl name: 6* , \underline{15*} . PLtoTF : \underline{2*} . pointer : \underline{71}, 72, 75, 77, 78, 79, 80, 132. print : \underline{2*} , 27, 107, 108, 111, 113, 115* , 125, 126, 136* . print ln: \underline{2*} , 6* , 27, 75, 108, 110, 111, 113, 115* ,

125, 126, 136* , 147. print octal : \underline{107}, 108, 111, 113, 125, 126. print real : 115* , 136* . putbyte: 127* . q: \underline{59}, \underline{80}, \underline{132}. r: \underline{59}. read : 28. read BCPL: 85, \underline{87}. read char info: 85, \underline{146}. read four bytes : 85, \underline{86}, 91. read input : \underline{146}, 147. read lig kern: 85, \underline{146}. read ln: 28. : 62, 64. : 112. reset : 6* . rewrite: 16* . right ln: \underline{23}, 24, 27, 28, 31. right z : \underline{117}, 122, 124* . round : 134, 136* . round message: \underline{115*} . rr : \underline{138}, 140* , 141, 142. set indices : \underline{80}, 115* . seven bit safe flag : \underline{67}, 70, 90, 110. seven bit safe flag code: \underline{44}, 47, 85. seven flag loc: \underline{70}, 133. seven unsafe: \underline{109}, 110, 111, 120, 133. shorten: \underline{78}, 115* . show error context : \underline{27}. simple: \underline{117}, 118, 121, 122, 124* , 125. : 100. skip code: \underline{44}, 47, 95. skip error : \underline{34}, 51, 52, 53, 54, 55, 56, 59, 60,

62, 64, 91. skip to end of item: \underline{33}, 34, 35, 84, 92, 93, 94,

95, 103, 104, 105, 106. skip to paren: \underline{34}, 83, 90, 97. : 49. : 125. : 100, 101, 102. : 60. : 60. : 102. sort in: \underline{75}, 103, 104, 111, 126. sort ptr : \underline{138}, 140* , 141, 142. start : \underline{36}, 37, 38, 39, 42, 44, 45. start ptr : \underline{36}, 37, 45. : 99. stop code: \underline{44}, 47, 95. stop flag : \underline{98}, 99, 116, 120. : 87. system dependencies: 2* , 16* , 18, 28, 148. t: \underline{51}, \underline{121}, \underline{138}. tail : \underline{46}. temp width: \underline{129}, 134. text : 5. tfm file: 2* , \underline{15*} , 16* , 127* . tfm name: \underline{15*} , 16* . : 111. : 88. : 90. : 110. : 89. : 136* . : 83. : 96. : 91. : 93. : 84,

93, 95, 104, 106. : 53, 54, 55. toint : 140* . : 112. true: 24, 28, 42, 63, 85, 90, 101, 102, 111, 120,

121, 130, 139. tt : \underline{118}, 125. t1 : \underline{46}. t10 : \underline{46}. t11 : \underline{46}. t12 : \underline{46}. t13 : \underline{46}. t14 : \underline{46}. t15 : \underline{46}. t16 : \underline{46}. t17 : \underline{46}. t18 : \underline{46}. t19 : \underline{46}. t2 : \underline{46}. t20 : \underline{46}. t3 : \underline{46}. t4 : \underline{46}. t5 : \underline{46}. t6 : \underline{46}. t7 : \underline{46}. t8 : \underline{46}. t9 : \underline{46}. uexit : 6* . unity : \underline{61}, 62, 70, 88, 134, 136* . : 70. : 126. : 126. : 126. var char code: \underline{44}, 47, 104, 106. : 29. : 29. width: \underline{44}, 71, 74, 75, 103, 104, 111, 115* , 126,

129, 130, 131, 132, 137. write: 2* . write ln: 2* . x: \underline{123*} , \underline{124*} . x lig cycle: \underline{118}, 124* , 125. xord : \underline{18}, 20, 28, 31, 32, 52. y: \underline{121}, \underline{123*} , \underline{124*} . y lig cycle: \underline{118}, 119, 124* , 125. : 51. zz : \underline{121}, 122.

310  NAMES OF THE SECTIONS  PLTOTF changes for C §149

⟨ Check for infinite ligature loops 125 ⟩ Used in section 110.

⟨ Check ligature program of c 120 ⟩ Used in sections 110 and 111.

⟨ Check the pieces of exten[c] 112 ⟩ Used in section 111. ⟨ Compute the check sum 134 ⟩ Used in section 133. ⟨ Compute the command parameters y, cc, and zz 122 ⟩ Used in section 121. ⟨ Compute the hash code, cur hash, for cur name 43 ⟩ Used in section 42. ⟨ Compute the ligature/kern program offset 139 ⟩ Used in section 130. ⟨ Compute the twelve subfile sizes 130 ⟩ Used in section 128. ⟨ Constants in the outer block 3* ⟩ Used in section 2*. ⟨ Correct and check the information 110 ⟩ Used in section 146.

⟨ Do the output 128 ⟩ Used in section 147.

⟨ Doublecheck the lig/kern commands and the extensible recipes 126 ⟩ Used in section 110. ⟨ Enter all of the names and their equivalents, except the parameter names 47 ⟩ Used in section 146. ⟨ Enter the parameter names 48 ⟩ Used in section 146. ⟨ Find the minimum lk offset and adjust all remainders 141 ⟩ Used in section 139. ⟨ For all characters g generated by c, make sure that char wd [g] is nonzero, and set seven unsafe if

c < 128 ≤ g 111 ⟩ Used in section 110. ⟨ Globals in the outer block 5, 15*, 18, 21, 23, 25, 30, 36, 38, 39, 44, 58, 65, 67, 72, 76, 79, 81, 98, 109, 114, 118, 129, 132,

138 ⟩ Used in section 2*.

⟨ Insert all labels into label table 140* ⟩ Used in section 139. ⟨ Local variables for initialization 19, 40, 69, 73 ⟩ Used in section 2*. ⟨ Make sure that c is not the largest element of a charlist cycle 113 ⟩ Used in section 110. ⟨ Make sure the ligature/kerning program ends appropriately 116 ⟩ Used in section 110. ⟨ Multiply by 10, add cur char − , and get next 64 ⟩ Used in section 62. ⟨ Multiply by r, add cur char − , and get next 60 ⟩ Used in section 59. ⟨ Output the character info 135 ⟩ Used in section 128. ⟨ Output the dimensions themselves 137 ⟩ Used in section 128. ⟨ Output the extensible character recipes 143 ⟩ Used in section 128. ⟨ Output the header block 133 ⟩ Used in section 128. ⟨ Output the ligature/kern program 142 ⟩ Used in section 128. ⟨ Output the parameters 144 ⟩ Used in section 128. ⟨ Output the slant (param[1]) without scaling 145 ⟩ Used in section 144. ⟨ Output the twelve subfile sizes 131 ⟩ Used in section 128. ⟨ Print c in octal notation 108 ⟩ Used in section 103. ⟨ Put the width, height, depth, and italic lists into final form 115* ⟩ Used in section 110. ⟨ Read a character property 104 ⟩ Used in section 103. ⟨ Read a font property value 84 ⟩ Used in section 82.

⟨ Read a kerning step 102 ⟩ Used in section 95. ⟨ Read a label step 97 ⟩ Used in section 95.

⟨ Read a ligature step 101 ⟩ Used in section 95. ⟨ Read a ligature/kern command 95 ⟩ Used in section 94. ⟨ Read a parameter value 93 ⟩ Used in section 92.

⟨ Read a skip step 100 ⟩ Used in section 95. ⟨ Read a stop step 99 ⟩ Used in section 95. ⟨ Read all the input 82 ⟩ Used in section 146.

⟨ Read an extensible piece 106 ⟩ Used in section 105. ⟨ Read an extensible recipe for c 105 ⟩ Used in section 104. ⟨ Read an indexed header word 91 ⟩ Used in section 85. ⟨ Read character info list 103 ⟩ Used in section 146. ⟨ Read font parameter list 92 ⟩ Used in section 85. ⟨ Read ligature/kern list 94 ⟩ Used in section 146. ⟨ Read the design size 88 ⟩ Used in section 85.

§149  PLTOTF changes for C  NAMES OF THE SECTIONS 311

⟨ Read the design units 89 ⟩ Used in section 85. ⟨ Read the font property value specified by cur code 85 ⟩ Used in section 84. ⟨ Read the seven-bit-safe flag 90 ⟩ Used in section 85.

⟨ Scan a face code 56 ⟩ Used in section 51.

⟨ Scan a small decimal number 53 ⟩ Used in section 51. ⟨ Scan a small hexadecimal number 55 ⟩ Used in section 51. ⟨ Scan a small octal number 54 ⟩ Used in section 51. ⟨ Scan an ASCII character code 52 ⟩ Used in section 51. ⟨ Scan the blanks and/or signs after the type code 63 ⟩ Used in section 62. ⟨ Scan the fraction part and put it in acc 66 ⟩ Used in section 62.

⟨ Set initial values 6*, 16*, 20, 22, 24, 26, 37, 41, 70, 74, 119 ⟩ Used in section 2*.

⟨ Set loc to the number of leading blanks in the buffer, and check the indentation 29 ⟩ Used in section 28.

⟨ Types in the outer block 17, 57, 61, 68, 71 ⟩ Used in section 2*.

The PLtoTF processor

(Version 3.3, September 1990)

Section Page

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 302 Property list description of font metric data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 303 Basic input routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 304 Basic scanning routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 304 Scanning property names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 304 Scanning numeric data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 304 Storing the property values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 304 The input phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 304 The checking and massaging phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 304 The output phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 305 The main program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 306 System-dependent changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 306 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 306

The preparation of this report was supported in part by the National Science Foundation under grants IST-8201926 and MCS-8300984, and by the System Development Foundation. ‘TEX’ is a trademark of the American Mathematical Society.