home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / text / tex / pastex / mf / inputs / romanu.mf < prev    next >
Text File  |  1992-09-27  |  36KB  |  742 lines

  1. % This is ROMANU.MF in text format, as of Mar 31, 1986.
  2. % Computer Modern Roman upper case:
  3. % These letters were originally coded by D. E. Knuth in November, 1979,
  4. % inspired by the Monotype faces used in {\sl The Art of Computer Programming}.
  5. % Sans serif designs by Richard Southall were added in April, 1982.
  6. % The programs were revised for the new \MF\ conventions in 1985.
  7. % Art Ogawa's mod: the sans serif I will nonetheless have serifs: for cmttss fonts.
  8.  
  9. % Character codes \0101 through \0132 are generated.
  10.  
  11. cmchar "The letter A";
  12. beginchar("A",13u#,cap_height#,0);
  13. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  14. numeric left_stem,right_stem,outer_jut,alpha;
  15. right_stem=cap_stem-stem_corr;
  16. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  17. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  18. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo;
  19. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  20. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  21. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  22. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  23. if y0<h-cap_notch_cut: y0:=h-cap_notch_cut;
  24.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  25.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  26.   ...{up}z0+.5left--cycle; % left and right diagonals
  27. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  28.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  29. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  30. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  31. if hefty: y5r else: y5 fi =5/12y0;
  32. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  33. if serifs: numeric inner_jut; pickup tiny.nib;
  34.  prime_points_inside(1,2); prime_points_inside(4,3);
  35.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  36.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  37.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  38.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  39. penlabels(0,1,2,3,4,5,6); endchar;
  40.  
  41. cmchar "The letter B";
  42. beginchar("B",12.5u#,cap_height#,0);
  43. italcorr .75cap_height#*slant-.5u#;
  44. adjust_fit(cap_serif_fit#,0);
  45. numeric left_stem,right_curve,middle_weight;
  46. left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
  47. pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
  48. lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0;
  49. filldraw stroke z1e--z2e; % stem
  50. penpos3(cap_band,90); penpos4(cap_band,90);
  51. penpos6(middle_weight,-90); penpos7(middle_weight,-90);
  52. penpos8(middle_weight,90); penpos9(middle_weight,90);
  53. penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
  54. penpos11(cap_band,-90); penpos12(cap_band,-90);
  55. z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
  56. z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h;
  57. x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
  58. x5r=hround(w-1.5u); x10r=hround(w-u);
  59. if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u];
  60. else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
  61.  x4l:=x4l-.5u; x9l:=x9l-.5u; fi
  62. x6l:=x6l-.5u; x11l:=x11l-.5u;
  63. fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e;  % upper lobe
  64. fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e;  % lower lobe
  65. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  66.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  67. math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  68.  
  69. cmchar "The letter C";
  70. if serifs: beginchar("C",13u#,cap_height#,0);
  71.  italcorr cap_height#*slant-.5u#;
  72.  adjust_fit(0,0);
  73.  pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
  74.  pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
  75.  rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
  76.  top y2r=h+o; bot y4r=-o; y3=.5[y2,y4];
  77.  bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps);
  78.  y5=max(good.y .95(h-y1),y4l+eps);
  79.  (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
  80.  (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
  81.  filldraw stroke z1e{x2-x1,10(y2-y1)}
  82.   ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
  83.  pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o;
  84.  x1r-x1'=2cap_curve-fine; y1'=y1;
  85.  path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
  86.  numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
  87.  filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
  88. else: beginchar("C",11.5u#,cap_height#,0);
  89.  italcorr cap_height#*slant-.5u#;
  90.  adjust_fit(0,0);
  91.  pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
  92.  pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
  93.  rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
  94.  lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
  95.  top y1r=vround .95h+o; top y2r=h+o; y3=.5h;
  96.  bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l;
  97.  filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  98.   & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
  99. math_fit(-.3cap_height#*slant-.5u#,.5ic#);
  100. penlabels(1,1',2,3,4,5,6); endchar;
  101.  
  102. cmchar "The letter D";
  103. beginchar("D",13.5u#,cap_height#,0);
  104. italcorr .7cap_height#*slant-.5u#;
  105. adjust_fit(cap_serif_fit#,0);
  106. pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
  107. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
  108. filldraw stroke z1e--z2e; % stem
  109. penpos3(cap_band,90); penpos4(cap_band,90);
  110. penpos5(cap_curve-stem_corr,0);
  111. penpos6(cap_band,-90); penpos7(cap_band,-90);
  112. z3r=top z1; y4=y3; y5=.51[y4,y6]; y6=y7;
  113. z7r=bot z2; x4=x6=.5w+.25u; x5r=hround(w-u);
  114. x4l:=x6l:=x4-.25cap_curve;
  115. fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;  % lobe
  116. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  117.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  118. math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7); endchar;
  119.  
  120. cmchar "The letter E";
  121. beginchar("E",12u#-width_adj#,cap_height#,0);
  122. italcorr cap_height#*slant-beak_jut#-.5u#;
  123. adjust_fit(cap_serif_fit#,0);
  124. h:=vround(h-stem_corr);
  125. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  126. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
  127. filldraw stroke z1e--z2e; % stem
  128. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  129. top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  130. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  131. pos5(cap_bar,-90); pos6(hair,0);
  132. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  133. pos0(cap_bar,90); pos7(hair,0);
  134. z0=z5; x6=x7; y6-y5l=y0l-y7;
  135. if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  136.  rt x9r=hround(w-.5u);
  137. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  138. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  139. pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
  140. bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  141. arm(8,9,h,beak_darkness,1.5beak_jut);  % lower arm and beak
  142. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  143.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  144. math_fit(0,.5ic#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  145.  
  146. cmchar "The letter F";
  147. beginchar("F",11.5u#-width_adj#,cap_height#,0);
  148. italcorr cap_height#*slant-beak_jut#-.25u#;
  149. adjust_fit(cap_serif_fit#,0);
  150. h:=vround(h-stem_corr);
  151. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  152. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
  153. filldraw stroke z1e--z2e; % stem
  154. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  155. top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps;
  156. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  157. pos5(cap_bar,-90); pos6(hair,0);
  158. top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
  159. pos0(cap_bar,90); pos7(hair,0);
  160. z0=z5; x6=x7; y6-y5l=y0l-y7;
  161. if serifs: rt x6r=hround(w-4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  162.  rt x9r=hround(w-.5u);
  163. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  164. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  165. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  166.  dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
  167. math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  168.  
  169. cmchar "The letter G";
  170. if serifs: beginchar("G",14u#,cap_height#,0);
  171.  italcorr cap_height#*slant-1.5u#-.5cap_serif_fit#;
  172.  adju