home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Tex / mf_three.arc / ROMMS.MF < prev    next >
Text File  |  1988-11-22  |  10KB  |  234 lines

  1. % This file contains special characters of ``math italic'' fonts
  2. % that actually are not supposed to be slanted.
  3. % Codes \0050--\0057, \0072--\0077, and \0133--\0137 are generated.
  4.  
  5. % The italic corrections are zero in all of these characters.
  6.  
  7. cmchar "Leftward top half arrow";
  8. compute_spread(.45x_height#,.55x_height#);
  9. beginchar(oct"050",18u#,v_center(spread#+rule_thickness#));
  10. adjust_fit(0,0); pickup crisp.nib;
  11. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  12. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  13. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  14. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  15. numeric t; path p; p=z4r..{2(x0-x4),y0-y4}z6r;
  16. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  17. filldraw z0--(x0,y2l)---z1l..z1r---z2r
  18.  ..subpath (t,0) of\\(z3r..{2(x0-x3),y0-y3}z5r)
  19.  --z3l..{2(x0-x3),y0-y3}cycle;  % arrowhead and stem
  20. penlabels(0,1,2,3,4,5,6); endchar;
  21.  
  22. cmchar "Leftward bottom half arrow";
  23. compute_spread(.45x_height#,.55x_height#);
  24. beginchar(oct"051",18u#,v_center(spread#+rule_thickness#));
  25. adjust_fit(0,0); pickup crisp.nib;
  26. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  27. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  28. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  29. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  30. numeric t; path p; p=z4r..{2(x0-x4),y0-y4}z6r;
  31. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  32. filldraw z0{2(x4-x0),y4-y0}..z4l
  33.  --subpath (0,t) of\\(z4r..{2(x0-x4),y0-y4}z6r)
  34.  ..z2l---z1l..z1r---(x0,y2r)--cycle;  % arrowhead and stem
  35. penlabels(0,1,2,3,4,5,6); endchar;
  36.  
  37. cmchar "Rightward top half arrow";
  38. compute_spread(.45x_height#,.55x_height#);
  39. beginchar(oct"052",18u#,v_center(spread#+rule_thickness#));
  40. adjust_fit(0,0); pickup crisp.nib;
  41. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  42. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  43. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
  44. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  45. numeric t; path p; p=z4l..{2(x0-x4),y0-y4}z6r;
  46. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  47. filldraw z0--(x0,y2l)---z1l..z1r---z2r
  48.  ..subpath (t,0) of\\(z3l..{2(x0-x3),y0-y3}z5r)
  49.  --z3r..{2(x0-x3),y0-y3}cycle;  % arrowhead and stem
  50. penlabels(0,1,2,3,4,5,6); endchar;
  51.  
  52. cmchar "Rightward bottom half arrow";
  53. compute_spread(.45x_height#,.55x_height#);
  54. beginchar(oct"053",18u#,v_center(spread#+rule_thickness#));
  55. adjust_fit(0,0); pickup crisp.nib;
  56. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  57. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  58. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
  59. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  60. numeric t; path p; p=z4l..{2(x0-x4),y0-y4}z6r;
  61. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  62. filldraw z0{2(x4-x0),y4-y0}..z4r
  63.  --subpath (0,t) of\\(z4l..{2(x0-x4),y0-y4}z6r)
  64.  ..z2l---z1l..z1r---(x0,y2r)--cycle;  % arrowhead and stem
  65. penlabels(0,1,2,3,4,5,6); endchar;
  66.  
  67. cmchar "Left hook";
  68. compute_spread(.45x_height#,.55x_height#);
  69. beginchar(oct"054",5u#,v_center(2spread#+rule_thickness#));
  70. adjust_fit(0,0); pickup rule.nib; autorounded;
  71. lft x2=hround u-eps; x1=x3=w-x2;
  72. y1-y3=spread; y2=.5[y1,y3]; y3=math_axis;
  73. draw z1{left}...z2{down}...z3{right};  % hook
  74. labels(1,2,3); endchar;
  75.  
  76. cmchar "Right hook";
  77. compute_spread(.45x_height#,.55x_height#);
  78. beginchar(oct"055",5u#,v_center(2spread#+rule_thickness#));
  79. adjust_fit(0,0); pickup rule.nib; autorounded;
  80. rt x2=hround(w-u)+eps; x1=x3=w-x2;
  81. y1-y3=spread; y2=.5[y1,y3]; y3=math_axis;
  82. draw z1{right}...z2{down}...z3{left};  % hook
  83. labels(1,2,3); endchar;
  84.  
  85. cmchar "Triangle pointing right";
  86. beginchar(oct"056",9u#,v_center(x_height#));
  87. adjust_fit(0,0); pickup rule.nib;
  88. numeric a,b; a=sqrt(3.14159\\ /sqrt3); % triangle area $=$ circle area
  89. b=.5w-(rt hround u); .5[x1',x2']=.5w; x2'-x1'=a*b*sqrt3;
  90. x1=x3=good.x x1'; x2=good.x x2';
  91. y2=.5[y1,y3]=math_axis; y1=good.y(y2+a*b);
  92. draw z1--z2--z3--cycle;  % triangle
  93. labels(1,2,3); endchar;
  94.  
  95. cmchar "Triangle pointing left";
  96. beginchar(oct"057",9u#,v_center(x_height#));
  97. adjust_fit(0,0); pickup rule.nib;
  98. numeric a,b; a=sqrt(3.14159\\ /sqrt3); % triangle area $=$ circle area
  99. b=.5w-(rt hround u); .5[x1',x2']=.5w; x1'-x2'=a*b*sqrt3;
  100. x1=x3=good.x x1'; x2=good.x x2';
  101. y2=.5[y1,y3]=math_axis; y1=good.y(y2+a*b);
  102. draw z1--z2--z3--cycle;  % triangle
  103. labels(1,2,3); endchar;
  104.  
  105. cmchar "Period";
  106. numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
  107. define_whole_blacker_pixels(dot_diam);
  108. beginchar(oct"072",5u#,dot_diam#,0);  % non-ASCII position
  109. adjust_fit(0,0); pickup fine.nib;
  110. pos1(dot_diam,0); pos2(dot_diam,90);
  111. lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2);  % dot
  112. penlabels(1,2); endchar;
  113.  
  114. cmchar "Comma";
  115. numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
  116. define_whole_blacker_pixels(dot_diam);
  117. beginchar(oct"073",5u#,dot_diam#,comma_depth#);  % non-ASCII position
  118. adjust_fit(0,0);
  119. x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0;
  120. comma(1,a,dot_diam,.2u,comma_depth);  % dot and tail
  121. penlabels(1); endchar;
  122.  
  123. cmchar "Less than sign";
  124. compute_spread(5/4x_height#,3/2x_height#);
  125. beginchar("<",14u#,v_center(spread#+rule_thickness#));
  126. italcorr h#*slant-u#;
  127. adjust_fit(0,0); pickup rule.nib;
  128. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  129. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  130. draw z1--z2--z3;  % diagonals
  131. labels(1,2,3); endchar;
  132.  
  133. cmchar "Virgule (slash)";
  134. beginchar(oct"075",9u#,body_height#,paren_depth#);  % non-ASCII position
  135. italcorr body_height#*slant-.5u#;
  136. adjust_fit(0,0); pickup rule.nib;
  137. rt x1=hround(w-u)+eps; top y1=h+eps;
  138. lft x2=hround u-eps; bot y2=-d-eps;
  139. draw z1--z2;  % diagonal
  140. penlabels(1,2); endchar;
  141.  
  142. cmchar "Greater than sign";
  143. compute_spread(5/4x_height#,3/2x_height#);
  144. beginchar(">",14u#,v_center(spread#+rule_thickness#));
  145. italcorr math_axis#*slant-u#;
  146. adjust_fit(0,0); pickup rule.nib;
  147. rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
  148. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  149. draw z1--z2--z3;  % diagonals
  150. labels(1,2,3); endchar;
  151.  
  152. cmchar "Five-pointed star";
  153. beginchar(oct"077",9u#,v_center(x_height#));
  154. adjust_fit(0,0); pickup tiny.nib;
  155. numeric theta; theta=360/5; % degrees between points
  156. pos0(curve,0); pos1(rule_thickness,90); x0=x1=good.x .5w;
  157. top y1r=vround(math_axis+.5x_height+.5rule_thickness);
  158. ypart(.5[z1,z0+(z1-z2) rotated 2theta])=math_axis;
  159. pos2(curve,theta); pos3(rule_thickness,90+theta);
  160. z2=z0; z3-z0=(z1-z0) rotated theta;
  161. z4=whatever[z0l,z1r]=whatever[z2r,z3r];
  162. filldraw for n=0 upto 4:
  163.  z0+(z1r-z0)rotated(n*theta)--z0+(z4-z0)rotated(n*theta)--endfor
  164.  cycle;  % star
  165. penlabels(0,1,2,3,4); endchar;
  166.  
  167. cmchar "Musical flat sign";
  168. beginchar(oct"133",7u#,body_height#,0);
  169. adjust_fit(0,0); pickup crisp.nib;
  170. numeric light_hair; light_hair=if hefty: vair else: hair fi;
  171. pos1(light_hair,0); pos2(light_hair,180); pos3(light_hair,0); x1=x2=x3;
  172. pos4(.25[light_hair,curve],60); pos5(curve,0);
  173. lft x1l=hround u; x4=.5w; rt x5r=hround(w-u);
  174. top y1=h; bot y3=-o; top y4=x_height+o;
  175. y2=y4-.2x_height; y5=3/4x_height;
  176. filldraw stroke z1e--z3e;  % stem
  177. filldraw stroke z2e{up}...z4e{right}...z5e{down}
  178.  ...{2(x3-x5e),y3-y5e}z3e;  % bowl
  179. penlabels(1,2,3,4,5); endchar;
  180.  
  181. cmchar "Musical natural sign";
  182. beginchar(oct"134",7u#,asc_height#,desc_depth#);
  183. adjust_fit(0,0); pickup crisp.nib;
  184. numeric light_hair; light_hair=if hefty: vair else: hair fi;
  185. pos1(light_hair,0); pos2(curve,90); pos3(curve,90);
  186. pos4(curve,90); pos5(curve,90); pos6(light_hair,0);
  187. rt x1r=hround 15/8u; x2=x4=x1l; x3=x5=x6r=w-x2;
  188. y1=h+o; top y2r=0; .5[y2,y3]=0; y4-y2=y5-y3=x_height; bot y6=-d-o;
  189. x2'=x1r; z2'=whatever[z2r,z3r]; x5'=x6l; z5'=whatever[z4l,z5l];
  190. (x1r,y)=z1l+whatever*(z5-z4); y6l:=y6l-(y-y1r); y1r:=y;
  191. filldraw z1l--z2l--z3l--z3r--z2'--z1r--cycle;  % left stem and lower bar
  192. filldraw z6r--z5r--z4r--z4l--z5'--z6l--cycle;  % right stem and upper bar
  193. penlabels(1,2,3,4,5,6); endchar;
  194.  
  195. cmchar "Musical sharp sign";
  196. beginchar(oct"135",7u#,asc_height#,desc_depth#);
  197. adjust_fit(0,0); pickup crisp.nib;
  198. numeric light_hair; light_hair=if hefty: vair else: hair fi;
  199. pos1(curve,90); pos2(curve,90); pos3(curve,90); pos4(curve,90);
  200. lft x1=lft x3=hround u; x2=x4=w-x1;
  201. top y3r=0; .5[y3,y4]=0; y1-y3=y2-y4=x_height;
  202. filldraw stroke z1e--z2e; filldraw stroke z3e--z4e;  % bars
  203. numeric theta,hstem; theta=angle(z2-z1);
  204. (hstem-crisp)*cosd theta=light_hair-crisp;
  205. pos5(hstem,theta); pos6(hstem,theta); pos7(hstem,theta); pos8(hstem,theta);
  206. lft x5l=lft x6l=hround(2u-.5light_hair); x7=x8=w-x6;
  207. top y7l=h+o; bot y6r=-d-o; z7-z5=z8-z6=(whatever,0) rotated theta;
  208. filldraw stroke z5e--z6e; filldraw stroke z7e--z8e;  % stems
  209. penlabels(1,2,3,4,5,6,7,8); endchar;
  210.  
  211. cmchar "Slur below (smile)";
  212. beginchar(oct"136",18u#,v_center(.5x_height#));
  213. adjust_fit(0,0); pickup fine.nib;
  214. numeric light_stem; light_stem=Vround .5[vair,stem];
  215. x1-.5hair=hround u; y1+.5hair=vround(h+.5hair); x3=w-x1; y3=y1;
  216. pos2(light_stem,90); x2=.5w; y2l=good.y -d;
  217. numeric theta; theta=angle((z2-z1)yscaled 3);
  218. pos1(hair,90+theta); pos3(hair,90-theta);
  219. filldraw z1l{dir theta}...z2l...{dir-theta}z3l
  220.  ..z3r{-dir-theta}...z2r...{-dir theta}z1r..cycle;  % arc
  221. penlabels(1,2,3); endchar;
  222.  
  223. cmchar "Slur above (frown)";
  224. beginchar(oct"137",18u#,v_center(.5x_height#));
  225. adjust_fit(0,0); pickup fine.nib;
  226. numeric light_stem; light_stem=Vround .5[vair,stem];
  227. x1-.5hair=hround u; y1-.5hair=vround(-d-.5hair); x3=w-x1; y3=y1;
  228. pos2(light_stem,90); x2=.5w; y2=good.y h;
  229. numeric theta; theta=angle((z2-z1)yscaled 3);
  230. pos1(hair,90+theta); pos3(hair,90-theta);
  231. filldraw z1l{dir theta}...z2l...{dir-theta}z3l
  232.  ..z3r{-dir-theta}...z2r...{-dir theta}z1r..cycle;  % arc
  233. penlabels(1,2,3); endchar;
  234.