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

  1. % Special font for the TeX and METAFONT manuals
  2. % This file was prepared "hastily" and hasn't been "polished".
  3. % In particular, some characters won't work when aspect_ratio<>1.
  4.  
  5. font_size 10pt#;
  6. em#:=10pt#; ht#:=250/36pt#;
  7. mode_setup;
  8.  
  9. font_identifier "MANFNT";
  10. font_coding_scheme "PI";
  11.  
  12. message "Hex symbols";
  13. width1#=.4pt#*(ht#/(100/36pt#));
  14. width2#=.6pt#*(ht#/(100/36pt#));
  15. define_blacker_pixels(width1,width2);
  16.  
  17. beginchar(1,2ht#,ht#,0); "Original hex";  % \hexa
  18. pickup pencircle scaled width1;
  19. w:=2good.x .5w;
  20. x1=x4=good.x 0; x2=x5=.5w; x3=x6=good.x w;
  21. y1=y2=y3=good.y h; y4=y5=y6=good.y 0;
  22. draw z1..z6; draw z2..z5; draw z3..z4;
  23. for k=1 upto 6: drawdot z[k]; endfor
  24. labels (1,2,3,4,5,6); endchar;
  25.  
  26. beginchar(2,2ht#,ht#,0); "Top/bot adjusted hex";  % \hexb
  27. pickup pencircle scaled width1;
  28. w:=2good.x .5w;
  29. x1=x4=good.x 0; x2=x5=.5w; x3=x6=good.x w;
  30. top y1=h; y1=y2=y3; bot y4=0; y4=y5=y6;
  31. draw z1..z6; draw z2..z5; draw z3..z4;
  32. for k=1 upto 6: drawdot z[k]; endfor
  33. labels (1,2,3,4,5,6); endchar;
  34.  
  35. beginchar(3,2ht#,ht#,0); "Bold top/bot adjusted hex";  % \hexc
  36. pickup pencircle scaled width2;
  37. w:=2good.x .5w;
  38. x1=x4=good.x 0; x2=x5=.5w; x3=x6=good.x w;
  39. top y1=h; y1=y2=y3; bot y4=0; y4=y5=y6;
  40. draw z1..z6; draw z2..z5; draw z3..z4;
  41. for k=1 upto 6: drawdot z[k]; endfor
  42. labels (1,2,3,4,5,6); endchar;
  43.  
  44. beginchar(4,2ht#,ht#,0); "Bold top/bot/lft/rt adjusted hex";  % \hexd
  45. pickup pencircle scaled width2;
  46. w:=2good.x .5w;
  47. lft x1=0; x1=x4; x2=x5=.5w; rt x3=w-1; x3=x6;
  48. top y1=h; y1=y2=y3; bot y4=0; y4=y5=y6;
  49. draw z1..z6; draw z2..z5; draw z3..z4;
  50. for k=1 upto 6: drawdot z[k]; endfor
  51. labels (1,2,3,4,5,6); endchar;
  52.  
  53. beginchar(5,2ht#,ht#,0); "Hex corrected for darkness in the center"; % \hexe
  54. pickup pencircle scaled width1;
  55. w:=2good.x .5w;
  56. top z1=(0,h); top z2=(.5w,h); top z3=(w,h);
  57. bot z4=(0,0); bot z5=(.5w,0); bot z6=(w,0);
  58. for k=1 upto 6: drawdot z[k]; endfor
  59. z1'=.25[z1,z6]; z6'=.75[z1,z6]; theta1:=angle(z6-z1)+90;
  60. z3'=.25[z3,z4]; z4'=.75[z3,z4]; theta3:=angle(z4-z3)+90;
  61. z7=z8=.5[z1,z6];
  62. penpos1'(width1,theta1); penpos6'(width1,theta1); penpos7(.6width1,theta1);
  63. penpos3'(width1,theta3); penpos4'(width1,theta3); penpos8(.6width1,theta3);
  64. draw z1..z1'; penstroke z1'e{z6'-z1'}..z7e..{z6'-z1'}z6'e; draw z6'..z6;
  65. draw z2..z5;
  66. draw z3..z3'; penstroke z3'e{z4'-z3'}..z8e..{z4'-z3'}z4'e; draw z4'..z4;
  67. penlabels(1,1',7,2,3,3',8,4,4',5,6,6'); endchar;
  68.  
  69. message "Stick A's";
  70. b#:=250/36pt#; a#:=150/36pt#; s#:=30/36pt#;
  71. standardwidth#:=.4pt#;
  72. darkwidth#:=.8pt#; lightwidth#:=.2pt#;
  73. define_blacker_pixels(standardwidth,darkwidth,lightwidth);
  74. define_pixels(b,a,s);
  75. def stick_A(expr alpha)(text pentype)=
  76. beginchar (incr(charcode),s#+a#+s#,b#,0);
  77. pickup pentype;
  78. bot z1=(good.x s,0); z5=z1+(a,0);
  79. z3=(1/2[x1,x5],good.y b);
  80. z2=alpha[z1,z3]; z4=alpha[z5,z3];
  81. draw z1..z3; draw z3..z5; draw z2..z4;
  82. drawdot z1; drawdot z5; drawdot z3;
  83. labels(1,2,3,4,5); endchar; enddef;
  84. charcode:=5; % the first A will be number 6
  85.  
  86. stick_A((3-sqrt5)/2, % (area above bar / area below) = golden ratio % \Aa
  87.  pencircle scaled standardwidth);
  88.  
  89. for alpha=.2 step .05 until .5+10epsilon:
  90.  stick_A(alpha,pencircle scaled standardwidth); endfor % chars 7..13
  91.  
  92. beginchar(14,s#+a#+s#,b#,0);
  93. pickup pencircle scaled standardwidth;
  94. bot z1=(good.x s,0); z5=z1+(a,0);
  95. z3=(1/2[x1,x5],good.y b);
  96. z4-z2=whatever*dir20; 1/2[y2,y4]=2/3[y3,y1];
  97. z2=whatever[z1,z3]; z4=whatever[z3,z5];
  98. draw z1..z3; draw z3..z5; draw z2..z4;
  99. drawdot z1; drawdot z5; drawdot z3;
  100. labels(1,2,3,4,5); endchar;
  101.  
  102. stick_A((3-sqrt5)/2,pencircle xscaled darkwidth yscaled lightwidth); % \Ab=15
  103. stick_A((3-sqrt5)/2,
  104.  pencircle xscaled darkwidth yscaled lightwidth rotated 30); % \Ac=16
  105.  
  106. message "Kidney beans";
  107. standardwidth#:=.4pt#;
  108. darkwidth#:=.8pt#; lightwidth#:=.2pt#;
  109. define_blacker_pixels(standardwidth,darkwidth,lightwidth);
  110. b#:=100/36pt#;
  111. define_pixels(b);
  112. def bean(text pentype)=
  113. beginchar (incr(charcode),2b#,1.5b#,0);
  114. pickup pentype;
  115. z1=(0,b); z2=(b,b); z3=(2b,b);
  116. z4=(0,0); z5=(b,0); z6=(2b,0);
  117. draw z5..z4..z1..z3..z6..cycle;
  118. labels(1,2,3,4,5,6); endchar; enddef;
  119. charcode:=16; % the first bean will be number 17
  120.  
  121. bean(pencircle scaled standardwidth);  % \beana=17
  122. bean(pencircle scaled darkwidth);  % \beanb=18
  123. bean(pencircle xscaled darkwidth yscaled lightwidth); % \beanc=19
  124. bean(pencircle xscaled darkwidth yscaled lightwidth rotated 30); % \beand=20
  125.  
  126. message "Pen nibs";
  127. bigthickwidth#:=8pt#; littlethickwidth#:=2pt#;
  128. define_blacker_pixels(bigthickwidth,littlethickwidth);
  129.  
  130. beginchar(21,bigthickwidth#,0,0);  % \niba
  131. pickup pencircle xscaled bigthickwidth yscaled littlethickwidth;
  132. lft z1=(0,good.y 0);
  133. drawdot z1;
  134. labels(1); endchar;
  135.  
  136. beginchar(22,bigthickwidth#,0,0);  % \nibb
  137. pickup pencircle xscaled bigthickwidth yscaled littlethickwidth rotated 30;
  138. lft z1=(0,good.y 0);
  139. drawdot z1;
  140. labels(1); endchar;
  141.  
  142. beginchar(23,littlethickwidth#,0,0);  % \nibc
  143. pickup pencircle yscaled bigthickwidth xscaled littlethickwidth;
  144. lft z1=(0,good.y 0);
  145. drawdot z1;
  146. labels(1); endchar;
  147.  
  148. message "Ionian letters";
  149. em#:=10pt#; cap#:=7pt#;
  150. thin#:=1/3pt#; thick#:=5/6pt#;
  151. slab#:=.8pt#;
  152. stem#:=.9pt#;
  153. o#:=1/5pt#;
  154.  
  155. define_pixels(em,cap);
  156. define_blacker_pixels(thin,thick,slab,stem);
  157. define_corrected_pixels(o);
  158.  
  159. curve_sidebar=round 1/18em;
  160.  
  161. %vardef pentaper@#(expr lt,rt) = % dropped from PLAIN
  162. % x@#l:=lt[x@#l,x@#]; x@#r:=rt[x@#r,x@#];
  163. % y@#l:=lt[y@#l,y@#]; y@#r:=rt[y@#r,y@#] enddef;
  164.  
  165.  
  166. % ill-fated example wasn't attractive enough by itself:
  167. %bar:=slab;
  168. %beginchar(24,0.6em#,cap#,0); % "The letter T"; \IOT=24
  169. %penpos1(bar,70);
  170. %penpos2(bar,35);
  171. %penpos4(bar,35);
  172. %penpos5(bar,55);
  173. %x1=0; y1r=h; y2r=y4r=.2[y1r,y1]; y5l=.3[y1l,y1];
  174. %x2l=1/3[x1l,x5l]; x4l=2/3[x1l,x5l]; x5=w;
  175. %penpos6(stem,20); pentaper6(.1,0);
  176. %penpos3(x6r-x6l,0);
  177. %penpos7(stem,10);
  178. %y3=y2; x3=.5w;
  179. %x6r=x3r; y6=2/3h;
  180. %x7=x6; y7=0;
  181. %penstroke z1e{curl infinity}..z2e..z4e..{curl infinity}z5e;
  182. %penstroke z3e..z6e{down}..z7e;
  183. %labels.top(1r,2l,2,2r,4l,4,4r,6);
  184. %labels.lft(1,1l,6l);
  185. %labels.rt(5,5r,5l,6r);
  186. %labels.bot(3l,3,3r,7,7r,7l);
  187. %endchar;
  188.  
  189. beginchar(25,5/9em#,cap#,0); % "The letter S"; /IOS=25
  190. penpos1(slab,70);
  191. penpos2(.5slab,80);
  192. penpos3(.5[slab,thick],200);
  193. penpos5(.5[slab,thick],210);
  194. penpos6(.7slab,80);
  195. penpos7(.25[slab,thick],72);
  196. x1=x5; y1r=.94h+o;
  197. x2=x4=x6=.5w; y2r=h+o; y4=.54h; y6l=-o;
  198. x3r=.04em; y3=.5[y4,y2];
  199. x5l=w-.03em; y5=.5[y4,y6];
  200. .5[x7l,x7]=.04em; y7l=.12h-o;
  201. path trial; trial=z3{down}..z4..{down}z5;
  202. pair dz; dz=direction 1 of trial;
  203. penpos4(thick,angle dz-90);
  204. penstroke z1e..z2e{left}..z3e{down}..z4e{dz}..z5e{down}..z6e{left}..z7e;
  205. labels.lft(2,3r,5r,6,7);
  206. labels.rt(1,3l,4,5l);
  207. labels.top(1r,2r,3,4l,5,6r,7r);
  208. labels.bot(1l,2l,4r,6l,7l);
  209. endchar;
  210.  
  211. beginchar(26,0.8em#,cap#,0); % "The letter O"; \IOO=26
  212.  penpos1(thick,10); penpos2(.1[thin,thick],90-10);
  213.  penpos3(thick,180+10); penpos4(thin,270-10);
  214.  x1l=w-x3l=curve_sidebar; x2=x4=.5w;
  215.  y1=.49h; y2l=-o; y3=.51h; y4l=h+o;
  216.  penstroke z1e{down}..z2e{right}..z3e{up}..z4e{left}..cycle;
  217.  penlabels(1,2,3,4); endchar;
  218.  
  219. beginchar(27,.35em#,cap#,0); % "The letter I"; \IOI=27
  220.  penpos1(stem,15); penpos2(.9stem,12); penpos3(stem,10);
  221.  x1=x2=x3=.5w; y1=h; y2=.55h; y3=0; x2l:=1/6[x2l,x2];
  222.  penstroke z1e..z2e{down}..z3e;
  223.  penlabels(1,2,3); endchar;
  224.  
  225. %ligtable 24: 24 kern .05em#, 26 kern -.05em#; % TT and TO are adjusted
  226.  
  227. message "Cubes and such";
  228. s#:=5pt#; define_pixels(s); % side of the square
  229. beginchar(28,5/3s#,4/3s#,0); % "Possible cube"; \cubea=28
  230. z1=(-epsilon,-epsilon);  z2=(s+epsilon,-epsilon);
  231.   z3=(-epsilon,s+epsilon); z4=(s+epsilon,s+epsilon);
  232. for k=1 upto 4: z[k+4]=z[k]+(2/3s,1/3s); endfor
  233. pickup pencircle scaled .4pt;
  234. draw z5--z6--z8--z7--cycle;
  235. pickup pencircle scaled 1.6pt;
  236. erase draw z2--z4--z3;
  237. pickup pencircle scaled .4pt;
  238. draw z1--z2--z4--z3--cycle;
  239. for k=1 upto 4:  draw z[k]--z[k+4]; endfor
  240. labels.top(1,2,5,6);
  241. labels.bot(3,4,7,8);
  242. endchar;
  243.  
  244. beginchar(29,5/3s#,4/3s#,0); % "Impossible cube"; \cubeb=29
  245. z1=(-epsilon,-epsilon);  z2=(s+epsilon,-epsilon);
  246.   z3=(-epsilon,s+epsilon); z4=(s+epsilon,s+epsilon);
  247. for k=1 upto 4: z[k+4]=z[k]+(2/3s,1/3s); endfor
  248. pickup pencircle scaled .4pt;
  249. draw z3--z4; draw z5--z6;
  250. cullit; pickup pencircle scaled 1.6pt;
  251. undraw z7--1/2[z7,z5];
  252.  undraw z2--1/2[z2,z4];
  253. cullit; pickup pencircle scaled .4pt;
  254. draw z3--z1--z2--z4;
  255.  draw z5--z7--z8--z6;
  256. for k=1 u