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

  1. % This file generates the following characters when their codes are known:
  2. % |minus|, |plus_minus|, |o_plus|, |o_times|,
  3. % |cup|, |cap|, |meet|, |join|,
  4. % |down_arrow|, |up_arrow|,
  5. % |left_arrow|, |right_arrow|, |double_arrow|,
  6. % |subset|, |superset|, |elt|,
  7. % |for_all|, |there_exists|, |false_that|,
  8. % |less|, |greater|, |underbar|,
  9. % |neq|, |leq|, |geq|, |eqv|,
  10. % |backslash|, |vertical|,
  11. % |cdot|, |diamond|,
  12. % |left_brace|, |right_brace|,
  13. % |straight_quotes|, |infty|, |integral|.
  14.  
  15. iff known minus: cmchar "Minus sign";
  16. beginarithchar(minus); pickup rule.nib;
  17. lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
  18. draw z1--z2;  % bar
  19. labels(1,2); endchar;
  20.  
  21. iff known plus_minus: cmchar "Plus-or-minus sign";
  22. beginarithchar(plus_minus); pickup rule.nib;
  23. numeric shiftup; shiftup=vround 1.5u;
  24. x1=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3;
  25. .5[y1,y2]=y3=y4=math_axis+shiftup; top y1=h+shiftup; y5=y6=y2;
  26. draw z1--z2;  % stem
  27. draw z3--z4;  % plus bar
  28. draw z5--z6;  % minus bar
  29. labels(1,2,3,4,5,6); endchar;
  30.  
  31. iff known o_plus: cmchar "Circle-plus operator";
  32. beginarithchar(o_plus); pickup light_rule.nib; autorounded;
  33. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  34. circle_points; draw_circle;  % circle
  35. draw z2--z6; draw z4--z8;  % bar and stem
  36. labels(1,2,3,4,5,6,7,8); endchar;
  37.  
  38. iff known o_times: cmchar "Circle-times operator";
  39. beginarithchar(o_times); pickup light_rule.nib; autorounded;
  40. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  41. circle_points; draw_circle;  % circle
  42. draw z1--z5; draw z3--z7;  % diagonals
  43. labels(1,2,3,4,5,6,7,8); endchar;
  44.  
  45. iff known cup: cmchar "Set union sign";
  46. beginchar(cup,12u#,.8asc_height#,0);
  47. italcorr .8asc_height#*slant-.5u#;
  48. adjust_fit(0,0); pickup rule.nib; autorounded;
  49. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  50. y1=good.y h+o; bot y3=-o; y2=y4=2/3[y1,y3]; y5=y1;
  51. draw z1---z2...z3...z4---z5;  % stems and cup
  52. labels(1,2,3,4,5); endchar;
  53.  
  54. iff known cap: cmchar "Set intersection sign";
  55. beginchar(cap,12u#,.8asc_height#,0);
  56. italcorr .8asc_height#*slant-.5u#;
  57. adjust_fit(0,0); pickup rule.nib; autorounded;
  58. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  59. y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
  60. draw z1---z2...z3...z4---z5;  % stems and cap
  61. labels(1,2,3,4,5); endchar;
  62.  
  63. iff known meet: cmchar "Lattice infimum (logical and) sign";
  64. beginchar(meet,12u#,.8asc_height#,0);
  65. italcorr .8asc_height#*slant-.5u#;
  66. adjust_fit(0,0); pickup rule.nib;
  67. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  68. y3=good.y h+o; bot y1=-o; y5=y1;
  69. draw z1--z3--z5;  % diagonals
  70. labels(1,3,5); endchar;
  71.  
  72. iff known join: cmchar "Lattice supremum (logical or) sign";
  73. beginchar(join,12u#,.8asc_height#,0);
  74. italcorr .8asc_height#*slant-.5u#;
  75. adjust_fit(0,0); pickup rule.nib;
  76. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  77. y1=good.y h+o; bot y3=-o; y5=y1;
  78. draw z1--z3--z5;  % diagonals
  79. labels(1,3,5); endchar;
  80.  
  81. iff known down_arrow: cmchar "Downward arrow";
  82. beginchar(down_arrow,9u#,asc_height#,asc_depth#);
  83. adjust_fit(0,0); pickup crisp.nib;
  84. pos1(rule_thickness,0); pos2(rule_thickness,0);
  85. pos3(bar,90); pos4(bar,90);
  86. lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
  87. x0=x1=x2; bot y0=-d; x0-x3=x4-x0=3u+eps;
  88. y3=y4=y0+.24asc_height+eps;
  89. pos5(bar,angle(z4-z0)); z5l=z0;
  90. pos6(bar,angle(z3-z0)); z6l=z0;
  91. z9=.381966[.5[z3,z4],z0];
  92. numeric t; path p; p=z4r{z9-z4}..z6r;
  93. t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
  94. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  95.  --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  96.  --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
  97. penlabels(0,1,2,3,4,5,6,9); endchar;
  98.  
  99. iff known up_arrow: cmchar "Upward arrow";
  100. beginchar(up_arrow,9u#,asc_height#,asc_depth#);
  101. italcorr .76asc_height#*slant+.5crisp#-u#;
  102. adjust_fit(0,0); pickup crisp.nib;
  103. pos1(rule_thickness,0); pos2(rule_thickness,0);
  104. pos3(bar,90); pos4(bar,90);
  105. lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
  106. x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps;
  107. y3=y4=y0-.24asc_height-eps;
  108. pos5(bar,angle(z4-z0)); z5l=z0;
  109. pos6(bar,angle(z3-z0)); z6l=z0;
  110. z9=.381966[.5[z3,z4],z0];
  111. numeric t; path p; p=z4l{z9-z4}..z6r;
  112. t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
  113. filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
  114.  --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  115.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  116. penlabels(0,1,2,3,4,5,6,9); endchar;
  117.  
  118. iff known left_arrow: cmchar "Leftward arrow";
  119. compute_spread(.45x_height#,.55x_height#);
  120. beginchar(left_arrow,18u#,v_center(spread#+rule_thickness#));
  121. adjust_fit(0,0); pickup crisp.nib;
  122. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  123. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  124. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  125. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  126. z9=.381966[.5[z3,z4],z0];
  127. numeric t; path p; p=z4r{z9-z4}..z6r;
  128. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  129. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  130.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  131.  --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
  132. penlabels(0,1,2,3,4,5,6,9); endchar;
  133.  
  134. iff known right_arrow: cmchar "Rightward arrow";
  135. compute_spread(.45x_height#,.55x_height#);
  136. beginchar(right_arrow,18u#,v_center(spread#+rule_thickness#));
  137. adjust_fit(0,0); pickup crisp.nib;
  138. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  139. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  140. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
  141. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  142. z9=.381966[.5[z3,z4],z0];
  143. numeric t; path p; p=z4l{z9-z4}..z6r;
  144. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  145. filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
  146.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  147.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  148. penlabels(0,1,2,3,4,5,6,9); endchar;
  149.  
  150. iff known double_arrow: cmchar "Left-and-right arrow";
  151. compute_spread(.45x_height#,.55x_height#);
  152. beginchar(double_arrow,18u#,
  153.  v_center(if monospace:.6asc_height#+fi spread#+rule_thickness#));
  154. adjust_fit(0,0); pickup crisp.nib;
  155. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  156. y0=y1=y2=math_axis if monospace:+vround.3asc_height fi; lft x0=hround u;
  157. if monospace: x1+.5rule_thickness=hround(w-u) else: x1=.5w fi;
  158. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  159. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  160. z9=.381966[.5[z3,z4],z0];
  161. numeric t; path p; p=z4r{z9-z4}..z6r;
  162. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  163. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  164.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  165.  --z3l{z9-z3}..z0 & cycle;  % left arrowhead and stem
  166. pos11(rule_thickness,90); pos12(rule_thickness,90); pos13(bar,0); pos14(bar,0);
  167. y10=y11=y12=math_axis if monospace:-vround.3asc_height fi;
  168. rt x10=hround(w-u);
  169. if monospace: x11-.5rule_thickness=hround u else: x11=.5w fi;
  170. y13-y10=y10-y14=.24asc_height+eps; x13=x14=x10-3u-eps;
  171. pos15(bar,angle(z14-z10)); z15l=z10; pos16(bar,angle(z13-z10)); z16l=z10;
  172. z19=.381966[.5[z13,z14],z10];
  173. numeric t; path p; p=z14l{z19-z14}..z16r;
  174. t=xpart(p intersectiontimes((0,y12l)--(w,y12l))); x12=xpart point t of p;
  175. filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r)
  176.  --z12l---z11l..z11r---z12r--subpath (t,0) of\\(z13l{z19-z13}..z15r)
  177.  --z13r{z19-z13}..z10 & cycle;  % right arrowhead and stem
  178. penlabels(0,1,2,3,4,5,6,9,10,11,12,13,14,15,16,19); endchar;
  179.  
  180. iff known subset: cmchar "Proper subset sign";
  181. compute_spread(5/4x_height#,3/2x_height#);
  182. beginchar(subset,14u#,v_center(spread#+rule_thickness#));
  183. italcorr h#*slant-u#;
  184. adjust_fit(0,0); pickup rule.nib; autorounded;
  185. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  186. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  187. x4=x5=.5w; y4=y1; y5=y3;
  188. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  189. labels(1,2,3,4,5); endchar;
  190.  
  191. iff known superset: cmchar "Proper superset sign";
  192. compute_spread(5/4x_height#,3/2x_height#);
  193. beginchar(superset,14u#,v_center(spread#+rule_thickness#));
  194. italcorr h#*slant-u#;
  195. adjust_fit(0,0); pickup rule.nib; autorounded;
  196. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  197. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  198. x4=x5=.5w; y4=y1; y5=y3;
  199. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  200. labels(1,2,3,4,5); endchar;
  201.  
  202. iff known elt: cmchar "Element sign";
  203. compute_spread(5/4x_height#,3/2x_height#);
  204. beginchar(elt,12u#,v_center(spread#+rule_thickness#));
  205. italcorr h#*slant-u#;
  206. adjust_fit(0,0); pickup rule.nib; autorounded;
  207. lft x2=hround 1.5u-eps; x1=x3=x6=w-x2;
  208. y1-y3=spread; y2=y6=.5[y1,y3]=math_axis;
  209. x4=x5=.5w+u; y4=y1; y5=y3;
  210. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  211. draw z2--z6;  % middle bar
  212. labels(1,2,3,4,5,6); endchar;
  213.  
  214. iff known for_all: cmchar "Universal quantifier";
  215. beginchar(for_all,10u#,asc_height#,0);
  216. italcorr asc_height#*slant;
  217. adjust_fit(0,0); pickup rule.nib;
  218. x2=good.x .5w; w:=r:=2x2;
  219. lft x1=0; x3=w-x1;
  220. top y1=h; bot y2=-o; y3=y1; y4=y5=good.y x_height;
  221. z4=whatever[z1,z2]; z5=whatever[z2,z3];
  222. draw z1--z2--z3;  % diagonals
  223. draw z4--z5;  % bar
  224. labels(1,2,3,4,5); endchar;
  225.  
  226. iff known there_exists: cmchar "Existential quantifier";
  227. beginchar(there_exists,10u#,asc_height#,0);
  228. italcorr asc_height#*slant;
  229. adjust_fit(0,0); pickup rule.nib;
  230. lft x1=hround u-eps; x2=x3=x5=w-x1; x4=x6-.25u=x1;
  231. top y1=h; bot y4=0; y2=y1; y5=y6=.5[y1,y3]; y3=y4;
  232. draw z1--z2--z3--z4;  % upper bar, stem, lower bar
  233. draw z5--z6;  % middle bar
  234. labels(1,2,3,4,5,6); endchar;
  235.  
  236. iff known false_that: cmchar "Logical not sign";
  237. beginchar(false_that,12u#,x_height#,0);
  238. italcorr x_height#*slant-.5u#;
  239. adjust_fit(0,0); pickup rule.nib;
  240. lft x1=hround u-eps; x2=x3=w-x1;
  241. y1=y2=good.y .5[bar_height,h]; y2-y3=1.2(h-bar_height);
  242. draw z1--z2--z3;  % bar and stem
  243. labels(1,2,3); endchar;
  244.  
  245. iff known less: cmchar "Less than sign";
  246. compute_spread(5/4x_height#,3/2x_height#);
  247. beginchar(less,14u#,v_center(spread#+rule_thickness#));
  248. italcorr h#*slant-u#;
  249. adjust_fit(0,0); pickup rule.nib;
  250. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  251. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  252. draw z1--z2--z3;  % diagonals
  253. labels(1,2,3); endchar;
  254.  
  255. iff known greater: cmchar "Greater than sign";
  256. compute_spread(5/4x_height#,3/2x_height#);
  257. beginchar(greater,14u#,v_center(spread#+rule_thickness#));
  258. italcorr math_axis#*slant-u#;
  259. adjust_fit(0,0); pickup rule.nib;
  260. rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
  261. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  262. draw z1--z2--z3;  % diagonals
  263. labels(1,2,3); endchar;
  264.  
  265. iff known underbar: cmchar "Underbar suitable for < and >";
  266. compute_spread((5/8+.45)*x_height#,(3/4+.55)*x_height#);
  267. beginchar(underbar,14u#,0,spread#-math_axis#+.5rule_thickness#);
  268. adjust_fit(0,0); pickup rule.nib;
  269. lft x1=hround 1.5u-eps; x2=w-x1; bot y1=bot y2=-d;
  270. draw z1--z2;  % bar
  271. labels(1,2); endchar;
  272.  
  273. iff known neq: cmchar "Unequals sign";
  274. compute_spread(.45x_height#,.55x_height#);
  275. beginchar(neq,14u#,v_center(4spread#+rule_thickness#));
  276. italcorr h#*slant-.5u#;
  277. adjust_fit(0,0); pickup rule.nib;
  278. lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
  279. y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
  280. draw z1--z2; draw z3--z4;  % bars
  281. lft x6=hround 3.5u-eps; x5=w-x6; top y5=h+o; bot y6=-d-o;
  282. draw z5--z6;  % diagonal
  283. labels(1,2,3,4,5,6); endchar;
  284.  
  285. iff known leq: cmchar "Less than or equal to sign";
  286. compute_spread(.45x_height#,.55x_height#);
  287. spread#':=spread#; spread':=spread; % the spread of `$=$'
  288. compute_spread(5/4x_height#,3/2x_height#);
  289. beginchar(leq,14u#,v_center(spread#'+spread#+rule_thickness#));
  290. italcorr h#*slant-u#;
  291. adjust_fit(0,0); pickup rule.nib;
  292. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  293. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  294. draw z1--z2--z3;  % diagonals
  295. x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
  296. labels(1,2,3,8,9); endchar;
  297.  
  298. iff known geq: cmchar "Greater than or equal to sign";
  299. compute_spread(.45x_height#,.55x_height#);
  300. spread#':=spread#; spread':=spread; % the spread of `$=$'
  301. compute_spread(5/4x_height#,3/2x_height#);
  302. beginchar(geq,14u#,v_center(spread#'+spread#+rule_thickness#));
  303. italcorr h#*slant-u#;
  304. adjust_fit(0,0); pickup rule.nib;
  305. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  306. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  307. draw z1--z2--z3;  % diagonals
  308. x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
  309. labels(1,2,3,8,9); endchar;
  310.  
  311. iff known eqv: cmchar "Equivalence or congruence sign";
  312. compute_spread(.45x_height#,.55x_height#);
  313. beginchar(eqv,14u#,v_center(2spread#+rule_thickness#));
  314. italcorr h#*slant-.5u#;
  315. adjust_fit(0,0); pickup rule.nib;
  316. lft x1=hround u-eps; x3=x5=x1; x2=x4=x6=w-x1;
  317. y1=y2; y3=y4=math_axis; y5=y6; y1-y3=y3-y5=spread;
  318. draw z1--z2;  % upper bar
  319. draw z3--z4;  % middle bar
  320. draw z5--z6;  % lower bar
  321. labels(1,2,3,4,5,6); endchar;
  322.  
  323. iff known backslash: cmchar "Reverse slash (backslash)";
  324. beginchar(backslash,9u#,body_height#,paren_depth#);
  325. adjust_fit(0,0); pickup rule.nib;
  326. lft x1=hround u-eps; top y1=h+eps;
  327. rt x2=hround(w-u)+eps; bot y2=-d-eps;
  328. draw z1--z2;  % diagonal
  329. labels(1,2); endchar;
  330.  
  331. iff known vertical: cmchar "Vertical line";
  332. beginchar(vertical,5u#,body_height#,paren_depth#);
  333. italcorr body_height#*slant+.5rule_thickness#-2u#;
  334. adjust_fit(0,0); pickup rule.nib;
  335. x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps;
  336. draw z1--z2;  % stem
  337. labels(1,2); endchar;
  338.  
  339. iff known cdot: cmchar "Period raised to axis height";
  340. beginchar(cdot,5u#,v_center(7u#));
  341. adjust_fit(0,0); pickup fine.nib;
  342. numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
  343. define_whole_blacker_pixels(dot_diam);
  344. pos1(dot_diam,0); pos2(dot_diam,90);
  345. lft x1l=hround(.5w-.5dot_diam); y1+.5dot_diam=vround(math_axis+.5dot_diam);
  346. z1=z2; dot(1,2);  % dot
  347. penlabels(1,2); endchar;
  348.  
  349. iff known diamond: cmchar "Diamond operator";
  350. beginchar(diamond,9u#,v_center(7u#));
  351. italcorr math_axis#*slant;
  352. adjust_fit(0,0); pickup rule.nib;
  353. numeric a; a=(lft 3.5u)*sqrt(3.14159/2); % an attempt to match circle area
  354. x4=x8=good.x .5w; w:=r:=2x4; x2=w-x6=good.x(x4+a);
  355. y2=y6=.5[y4,y8]=math_axis; y8=good.y(y2+a);
  356. draw z2--z4--z6--z8--cycle;  % bowl
  357. labels(2,4,6,8); endchar;
  358.  
  359. iff known left_brace: cmchar "Left curly brace";
  360. beginchar(left_brace,9u#,body_height#,paren_depth#);
  361. italcorr body_height#*slant+.5vair#-u#;
  362. adjust_fit(0,0); pickup fine.nib;
  363. forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor
  364. forsuffixes $=2,3,5,6: pos$(stem,0); endfor
  365. x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
  366. lft x4l=hround(1.5u-.5vair); lft x2l=hround(.5w-.5stem);
  367. top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
  368. y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
  369. filldraw z1l{left}...z2l---z3l...{left}z4l
  370.  --z4'l{right}...z5l---z6l...{right}z7l
  371.  --z7r--z7'r{left}...z6r---z5r...{left}.5[z4r,z4'r]{right}
  372.  ...z3r---z2r...{right}z1'r--z1r--cycle;  % stroke
  373. penlabels(1,2,3,4,5,6,7); endchar;
  374.  
  375. iff known right_brace: cmchar "Right curly brace";
  376. beginchar(right_brace,9u#,body_height#,paren_depth#);
  377. italcorr math_axis#*slant+.5vair#-u#;
  378. adjust_fit(0,0); pickup fine.nib;
  379. forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor
  380. forsuffixes $=2,3,5,6: pos$(stem,0); endfor
  381. x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
  382. rt x4r=hround(w-1.5u+.5vair); rt x2r=hround(.5w+.5stem);
  383. top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
  384. y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
  385. filldraw z1r{right}...z2r---z3r...{right}z4r
  386.  --z4'r{left}...z5r---z6r...{left}z7r
  387.  --z7l--z7'l{right}...z6l---z5l...{right}.5[z4l,z4'l]{left}
  388.  ...z3l---z2l...{left}z1'l--z1l--cycle;  % stroke
  389. penlabels(1,2,3,4,5,6,7); endchar;
  390.  
  391. iff known straight_quotes: cmchar "Straight double quotes";
  392. beginchar(straight_quotes,9u#,asc_height#,0);
  393. numeric top_width#,spread#; top_width#=if serifs: flare# else: stem# fi;
  394. spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
  395. italcorr asc_height#*slant+.5top_width#+.5spread#-4u#;
  396. adjust_fit(0,0);
  397. x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3;
  398. y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height);
  399. if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
  400.  pos3(flare,0); pos4(vair,0);
  401.  y1+.5stem=h; filldraw circ_stroke z1e--z2e;  % left stem and bulb
  402.  filldraw circ_stroke z3e--z4e;  % right stem and bulb
  403. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  404.  pos3(stem,0); pos4(vair,0);
  405.  top y1=h; filldraw stroke z1e--z2e;  % left stem
  406.  filldraw stroke z3e--z4e; fi  % right stem
  407. penlabels(1,2,3,4); endchar;
  408.  
  409. iff known infty: cmchar "Infinity";
  410. beginchar(infty,18u#,x_height#,0);
  411. italcorr .7x_height#*slant-.5u#;
  412. adjust_fit(0,0); pickup fine.nib;
  413. numeric theta,phi;
  414. if monospace: phi=-theta=90;
  415. else: phi=angle(4u,h); theta=angle(6u,-h); fi
  416. pos1(vair,180); pos2(.5[vair,curve],90+.5theta); pos3(curve,90+theta);
  417. pos4(curve,90+theta); pos5(.5[vair,curve],90+.5theta);
  418. pos6(vair,180); pos7(.2[vair,curve],270+.5phi);
  419. pos8(.3[vair,curve],270+phi); pos9(.2[vair,curve],270+.5phi);
  420. lft x1r=w-rt x6l=hround u; x2=x9=.4[x1,x8]; x5=x7=.6[x8,x6];
  421. if monospace: x2l:=x2r; x5r:=x5l; x7r:=x7l; x9l:=x9r; fi
  422. y1=y6=.5h; top y2r=top y7l=h+oo; bot y5l=bot y9r=-oo;
  423. x8=.5[x3,x4]=.5w; y8=.5[y3,y4]=.5h;
  424. y3-y4=h/3; z3-z4=whatever*dir theta;
  425. filldraw stroke z1e{up}...z2e{right}...z3e---z4e...z5e{right}
  426.  ...z6e{up}...z7e{left}...{-dir phi}z8e...{left}z9e...z1e{up}; % bowls
  427. penlabels(1,2,3,4,5,6,7,8,9); endchar;
  428.  
  429. iff known integral: cmchar "Integral sign";
  430. beginchar(integral,5.25u#+max(1.25u#,stem#)+2max(1.5u#,curve#),
  431.  asc_height#,desc_depth#);
  432. italcorr asc_height#*slant-.5u#;
  433. adjust_fit(0,0); pickup fine.nib;
  434. pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(.6[hair,stem],180);
  435. pos5(stem,180); pos5'(stem,0); z5'=z5; pos6(.6[hair,stem],0);
  436. pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
  437. x7=w-x3=2.4u; rt x1r=max(rt x3+eps,hround(w-u)); x9=w-x1;
  438. x5=.5[x4,x6]; x4-x6=1.5u; lft x5r=hround(.5w-.5stem);
  439. y9-.5curve=vround(-.9d-o+vair); y3-y1=y9-y7;
  440. top y3r=h+o; bot y7r=-d-o; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=2/3(y3-y7);
  441. bulb(3,2,1); bulb(7,8,9);  % bulbs
  442. filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
  443.  ..tension atleast 1 and atleast .8..{z5-z4}z5e;  % upper stem
  444. filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
  445.  ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e;  % lower stem
  446. math_fit(0,-2u#); penlabels(1,2,3,4,5,6,7,8,9); endchar;
  447.