Debian Codegraph @

texmf-dist/fonts/source/public/cm/sym.mf

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