home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / useful / text / tex / pastex / mf / inputs / cm / cmman.mf < prev    next >
Text File  |  1993-11-28  |  29KB  |  643 lines

  1. % Variants of Computer Modern, specially for the TeX/METAFONT manuals
  2.  
  3. if unknown cmbase: input cmbase fi
  4. mode_setup;
  5.  
  6. def generate suffix t= enddef;
  7.  
  8. inner cmchar;
  9.  
  10. font_size 10pt#;
  11. font_identifier "CMMAN";
  12. font_coding_scheme "PI";
  13.  
  14. input cmtt10; font_setup;
  15.  
  16. cmchar "Cross between 0 and O";
  17. beginchar("0",9u#,fig_height#,0);
  18. italcorr fig_height#*slant-.5u#;
  19. adjust_fit(0,0);
  20. penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0);
  21. superness:=.77;
  22. x2r=round max(.7u,1.45u-.5curve); x4r=w-x2r; x1=x3=.5w;
  23. y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
  24. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  25.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  26. penlabels(1,2,3,4); endchar;
  27.  
  28. input cmssq8; slant:=sind 12/cosd 12; font_setup;
  29.  
  30. cmchar "Lowercase Greek beta";
  31. beginchar(oct"014",9.5u#,asc_height#,desc_depth#);
  32. italcorr .5[x_height#,asc_height#]*slant-u#;
  33. adjust_fit(0,0); pickup fine.nib;
  34. pos0(hair,180); pos1(hair,180); pos2(vair,90);
  35. pos3(stem,0); pos4(vair,-90); pos5(hair,-180);
  36. pos6(vair,-270); pos7(curve,-360); pos8(vair,-450); pos9(hair,-540);
  37. x0=x1=x9; lft x0l=hround(1.5u-.5hair); x2=x4=x6=x8=.5w+.25u;
  38. rt x3r=hround(w-1.5u); rt x7r=hround(w-1.5u+.5curve); rt x5l=hround(x4-u);
  39. bot y0=-d; y1=top y6r=x_height; top y2r=h+oo; y3=.5[y2,y4];
  40. y5=.5[y4,y6]; top y6r-bot y4r=vstem+eps; bot y8=-oo; y7=y9=.5[y6,y8];
  41. if y6l<y4l: y6l:=y4l:=y5; fi
  42. filldraw stroke z0e---z1e...pulled_arc.e(2,3)
  43.  & pulled_arc.e(3,4)...{up}z5e;  % stem and upper bowl
  44. filldraw stroke z5e{up}...pulled_arc.e(6,7)
  45.  & pulled_arc.e(7,8)...{up}z9e;  % lower bowl
  46. math_fit(desc_depth#*slant+.5hair#-u#,.7x_height#*slant+.5curve#-1.5u#);
  47. penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  48.  
  49. cmchar "Lowercase thorn";
  50. beginchar(oct"015",10u#+serif_fit#,asc_height#,desc_depth#);
  51. italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
  52. adjust_fit(serif_fit#,0);
  53. pickup tiny.nib; pos1(stem',0); pos2(stem,0);
  54. pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
  55. lft x1l=hround(2.5u-.5stem'); top y1=h;
  56. numeric edge; edge=rt x2r;
  57. pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
  58. pos4(vair',90); pos5(curve,0); pos6(vair,-90);
  59. rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
  60. x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
  61. rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
  62. x6=x3; bot y6r=-oo;
  63. (x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
  64. filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
  65.  &z5e{down}...{5(x6-x5),y6-y5}z6e;  % bowl
  66. y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
  67. pickup tiny.nib; bot y2=-d;
  68. filldraw stroke z1e--z0'e--z0e--z2e;  % stem
  69. pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
  70. z7'=z2; x8l=x7'l; bot y8=0;
  71. filldraw stroke z7'e--z8e;  % point
  72. if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);  % upper serif
  73.  dish_serif(2,0,b,1/3,jut,c,1/3,0); fi  % lower serif
  74. penlabels(0,1,2,3,4,5,6,8); endchar;
  75.  
  76. input cmr10; font_setup;
  77.  
  78. message "Parentheses";
  79. code:=ASCII "0"; % the characters will be 123456789:
  80. for c=0,1,2,4,infinity:
  81. cmchar "Left paren with curl "&decimal c;
  82. beginchar(incr code,7u#,body_height#,paren_depth#);
  83. italcorr body_height#*slant-.5u#;
  84. adjust_fit(0,0); pickup fine.nib;
  85. pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
  86. rt x1r=rt x3r=round(w-u); lft x2l=round(x1-4u if monospace: +4/3u fi);
  87. top y1=h; y2=.5[y1,y3]=math_axis;
  88. filldraw stroke z1e{curl c}..z2e..{curl c}z3e;  % arc
  89. penlabels(1,2,3); endchar;
  90.  
  91. cmchar "Right paren with curl "&decimal c;
  92. beginchar(incr code,7u#,body_height#,paren_depth#);
  93. italcorr math_axis#*slant-.5u#;
  94. adjust_fit(0,0); pickup fine.nib;
  95. pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
  96. lft x1l=lft x3l=round u; rt x2r=round(x1+4u if monospace: -4/3u fi);
  97. top y1=h; y2=.5[y1,y3]=math_axis;
  98. filldraw stroke z1e{curl c}..z2e..{curl c}z3e;  % arc
  99. penlabels(1,2,3); endchar;
  100. endfor
  101.  
  102. cmchar "Variant letter g";
  103. beginchar("g",10u#+serif_fit#,x_height#,desc_depth#);
  104. italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
  105. adjust_fit(0,serif_fit# if serifs: -.5u# fi);
  106. pickup tiny.nib; pos1(stem',0); pos2(stem,0);
  107. pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
  108. rt x1r=hround(w-2.5u+.5stem');
  109. numeric edge; edge=lft x2l;
  110. path edge_path; edge_path=(edge,h)--(edge,0);
  111. pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
  112. pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
  113. lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
  114. x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
  115. lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
  116. x6l=x4l-.2u; bot y6r=vround 1/3vair;
  117. lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair);
  118. (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
  119. (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
  120. filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
  121.  &super_arc.e(5,6)&z6e{right}...{up}z7e;  % bowl
  122. y1=ypart(edge_path intersectionpoint(z3l{up}...{left}z4l));
  123. y0=ypart(edge_path intersectionpoint(z7l{down}...{left}z6l));
  124. pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi;
  125. filldraw stroke z1e--z0'e--z0e--z2e;  % stem
  126. pickup crisp.nib;
  127. pos8(hround(hair-stem_corr),0); pos7'(stem',0);
  128. z7'=z1; x8r=x7'r; top y8=h+oo;
  129. filldraw stroke z7'e--z8e;  % point
  130. if serifs: pickup tiny.nib;
  131.  pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1;
  132.  pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare;
  133.  pos11(flare,-180); z11r=z10r;
  134.  bulb(9,10,11); filldraw stroke super_arc.e(2,9);  % tail
  135. else: pickup fine.nib; pos2'(stem,0); z2'=z2;
  136.  z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0);
  137.  pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1;
  138.  pos10(.5[vair,flare],-90); lft x10=hround 1.25u;
  139.  y10r=good.y -5/6d; y10l:=good.y y10l;
  140.  filldraw stroke z2'e..z2''e&super_arc.e(2'',9)
  141.   & term.e(9,10,left,.9,4); fi  % tail
  142. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  143.  
  144. input cmtt9; font_setup;
  145.  
  146. cmchar "Variant letter g";
  147. beginchar("x",10u#+serif_fit#,x_height#,desc_depth#);
  148. italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
  149. adjust_fit(0,serif_fit# if serifs: -.5u# fi);
  150. pickup tiny.nib; pos1(stem',0); pos2(stem,0);
  151. pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
  152. rt x1r=hround(w-2.5u+.5stem');
  153. numeric edge; edge=lft x2l;
  154. path edge_path; edge_path=(edge,h)--(edge,0);
  155. pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
  156. pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
  157. lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
  158. x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
  159. lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
  160. x6l=x4l-.2u; bot y6r=vround 1/3vair;
  161. lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair);
  162. (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
  163. (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
  164. filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
  165.  &super_arc.e(5,6)&z6e{right}...{up}z7e;  % bowl
  166. y1=ypart(edge_path intersectionpoint(z3l{up}...{left}z4l));
  167. y0=ypart(edge_path intersectionpoint(z7l{down}...{left}z6l));
  168. pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi;
  169. filldraw stroke z1e--z0'e--z0e--z2e;  % stem
  170. pickup crisp.nib;
  171. pos8(hround(hair-stem_corr),0); pos7'(stem',0);
  172. z7'=z1; x8r=x7'r; top y8=h+oo;
  173. filldraw stroke z7'e--z8e;  % point
  174. if serifs: pickup tiny.nib;
  175.  pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1;
  176.  pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare;
  177.  pos11(flare,-180); z11r=z10r;
  178.  bulb(9,10,11); filldraw stroke super_arc.e(2,9);  % tail
  179. else: pickup fine.nib; pos2'(stem,0); z2'=z2;
  180.  z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0);
  181.  pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1;
  182.  pos10(.5[vair,flare],-90); lft x10=hround 1.25u;
  183.  y10r=good.y -5/6d; y10l:=good.y y10l;
  184.  filldraw stroke z2'e..z2''e&super_arc.e(2'',9)
  185.   & term.e(9,10,left,.9,4); fi  % tail
  186. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  187.  
  188. input cmbx9; font_setup;
  189.  
  190. cmchar "Variant letter g";
  191. beginchar("y",10u#+serif_fit#,x_height#,desc_depth#);
  192. italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
  193. adjust_fit(0,serif_fit# if serifs: -.5u# fi);
  194. pickup tiny.nib; pos1(stem',0); pos2(stem,0);
  195. pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
  196. rt x1r=hround(w-2.5u+.5stem');
  197. numeric edge; edge=lft x2l;
  198. path edge_path; edge_path=(edge,h)--(edge,0);
  199. pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
  200. pos4(vair,90); pos5(curve,180); pos6(vair