Debian Codegraph @

texmf-dist/fonts/source/public/amsfonts/symbols/xbcaps.mf

raw
1 %% filename: xbcaps.mf
2 %% version: 2.2
3 %% date: 1995/01/04
4 %%
5 %% American Mathematical Society
6 %% Technical Support
7 %% Publications Technical Group
8 %% 201 Charles Street
9 %% Providence, RI 02904
10 %% USA
11 %% tel: (401) 455-4080
12 %% (800) 321-4267 (USA and Canada only)
13 %% fax: (401) 331-3842
14 %% email: [email protected]
15 %%
16 %% Copyright 1995, 2009 American Mathematical Society.
17 %%
18 %% This Font Software is licensed under the SIL Open Font License,
19 %% Version 1.1. This license is in the accompanying file OFL.txt, and
20 %% is also available with a FAQ at: http://scripts.sil.org/OFL.
21 %%
22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23
24
25 % Changes made by Stefan Lindner for version 2.1 to fix some
26 % rounding problems at low resolutions 03-Mar-1991
27 % ru defined and substituted for u in drawings of characters.
28
29 def ru(expr A)=
30 begingroup
31 save rounded_u; rounded_u#:=A*u#;
32 define_whole_vertical_pixels(rounded_u);
33 rounded_u
34 endgroup
35 enddef;
36
37 iff OK "A": "The letter A"; beginchar("A",13unit#,cap#,0);
38
39 top z20=(.48w,h+Aapex); pos20(Atip,0);
40 bot y3=0; z3l=whatever[z20l,(1.5unit,0)];
41 bot y6=0; z6r=whatever[z20r,(w-round(unit+u),0)];
42 z20l=z1l; z20r=z4r;
43 mpos(1,3)(Athin,constant_angle(z20l,(1.5unit,0),0));
44 mpos(4,6)(stem,constant_angle(z20r,(w-round(unit+u),0),0));
45 onaline(1l,3l)(2l); y2l=c_round_bracket;
46 onaline(1r,3r)(2r); y2r=c_inner_bracket;
47 onaline(4l,6l)(5l); y5l=c_inner_bracket;
48 onaline(4r,6r)(5r); y5r=c_thick_stem_bracket;
49 z40=whatever[.8[z1l,z1r],z2r]; z40=whatever[.8[z4r,z4l],z5l];
50 y41=round(.4[serif_thickness,y40]-Abar); % bar bottom
51 y42=y41+Abar;
52 ref1=rightserif(z3,z1,z2l,z40,ru(7),bracket0)--z40;
53 ref2=z40--leftserif(z6,z4,z40,z5r,ru(7),bracket32);
54 ref3=(0,y41)--(w,y41);
55 ref4=(0,y42)--(w,y42);
56 x11=xpart (ref1 intersectionpoint ref3);
57 x12=xpart (ref2 intersectionpoint ref3);
58 x13=xpart (ref2 intersectionpoint ref4);
59 x14=xpart (ref1 intersectionpoint ref4);
60 y11=y12=y41; y13=y14=y42;
61
62 p1=z20l--leftserif(z3,z1,z2l,z1r,ru(3),bracket0)--ref1--ref2--
63 rightserif(z6,z4,z5l,z5r,ru(2.5),bracket0)--z20r--cycle;
64 p2=z11--z12--z13--z14--cycle;
65
66 showpoints(1,2,3,4,5,6,11,12,13,14,20,40,41,42);
67 draw_outlines;
68 endchar;
69
70
71 iff OK "B": "The letter B"; beginchar("B",12unit#,cap#,0);
72
73 top lft z1l=(round(ru(5)+2smallu),h);
74 z2l=(x1l,h-c_thick_stem_bracket);
75 z2r=(x1r,h-c_round_bracket);
76 z3l=(x1l,c_thick_stem_bracket);
77 z3r=(x1r,c_round_bracket);
78 bot z4l=(x1l,0);
79 mpos(1,4)(Bstem,0);
80 z5l=(rt x1r+ru(4),y1);
81 z5r=(rt x1r+ru(3),y1-Btopthin);
82 onaline(1r,4r)(8l);
83 bot y8l=.5h-smallu; pos8(Bmidthin,90);
84 rt z6l=(w-round(1.5unit),.5[y5l,y8l]); pos6(Btopcurve,180);
85 rt z9l=(w-round(ru(2.5)),.5[y10l,y8r]); pos9(Bbotcurve,180);
86 z10l=(rt x1r+ru(4),y4);
87 z10r=(rt x1r+ru(3),y4+Bbotthin);
88 z7l=(rt x1r+ru(3),y8l);
89 rt z7=(lft x9r-ru(3),.5[top y8l,y8r]);
90
91 p1=leftserif(z1,z4,z2l,z2r,ru(5.2),bracket4)--
92 leftserif(z4,z1,z3l,z3r,ru(5.2),bracket4)--
93 curve.br(z10l,.5,z9l,.7)--curve.tr(z9l,.7,z7,.5)--
94 curve.br(z7,.5,z6l,.5)--curve.tr(z6l,.8,z5l,.6)--cycle;
95 p1'=z8l--z8r;
96 p1''=curve.br(z8r,.6,z6r,.85)--curve.tr(z6r,.7,z5r,.5)...
97 {left}z5r...{down}z2r--cycle;
98 p2''=z8l--z3r{down}...{right}z10r--
99 curve.br(z10r,.6,z9r,.7)--curve.tr(z9r,.8,z7l,.6)--cycle;
100
101 showpoints(1,2,3,4,5,6,7,8,9,10);
102 draw_outlines;
103 endchar;
104
105
106 iff OK "C": "The letter C"; beginchar("C",(1+12)*unit#,cap#,0);
107
108 bot z2l=(max(7unit,.5w),-Cover);
109 y2r=y2l+Cbotthin;
110 x2r=x2l+(min(Cbotthin,abs(y2r-y2l)));
111 bot rt z1l=(w-ru(2),2unit);
112 ref1=z2l{right}...z1l;
113 pos1(Ctip,angle(z1l-precontrol 1 of ref1)+ 90);
114 lft z3l=(round ru(2),.5h); pos3(Ccurve,0);
115 top z4l=(x2l,h+Cover);
116 y4r=y4l-Ctopthin;
117 x4r=x4l+(min(ru(.5),abs(y4r-y4l)));
118 bot rt z5=(w-round(unit+ru(.5)),h-3unit-ru(2.5));
119 z6=(x5,y4l);
120 z7=z6-(ru(2.5),ru(2.5));
121 p1=curve.tl(z4l,.5,z3l,.7)--curve.bl(z3l,.7,z2l,.5)...z1l--
122 z1r...reversecurve.bl(z3r,.7,z2r,.6)--reversecurve.tl(z4r,.6,z3r,.6)--
123 beak(z4r,z5,z6,z7,z4l,1.2)--cycle;
124
125 showpoints(1,2,3,4,5,6,7);
126 draw_outlines;
127 endchar;
128
129
130 iff OK "D": "The letter D"; beginchar("D",13unit#,cap#,0);
131
132 top lft z1l=(round(ru(5)+smallu),h);
133 z2l=(x1l,h-c_thick_stem_bracket);
134 z2r=(x1r,h-c_round_bracket);
135 z3l=(x1l,c_thick_stem_bracket);
136 z3r=(x1r,c_round_bracket);
137 bot z4l=(x1l,0);
138 mpos(1,4)(stem,0);
139 z5l=(rt x1r+ru(4),y4);
140 z5r=(rt x1r+ru(3),y5l+Dbotthin);
141 rt z6l=(w-u-2smallu,.52h); pos6(Dcurve,180);
142 z7l=(rt x1r+ru(4),y1);
143 z7r=(rt x1r+ru(3.5),y7l-Dtopthin);
144
145 p1=leftserif(z1,z4,z2l,z2r,ru(4.5),bracket4)--
146 leftserif(z4,z1,z3l,z3r,ru(4.5),bracket4)--
147 curve.br(z5l,.5,z6l,.7)--curve.tr(z6l,.7,z7l,.5)--cycle;
148 p1''=curve.br(z5r,.5,z6r,.8)--curve.tr(z6r,.7,z7r,.5)...
149 {down}z2r...z3r{down}...{right}z5r--cycle;
150
151 showpoints(1,2,3,4,5,6,7);
152 draw_outlines;
153 endchar;
154
155
156 iff OK "E": "The letter E"; beginchar("E",(1+11)*unit#,cap#,0);
157
158 top lft z1l=(round(ru(5.5)),h);
159 z2l=(x1l,h-c_thick_stem_bracket);
160 z2r=(x1r,h-c_inner_bracket);
161 z3l=(x1l,c_thick_stem_bracket);
162 z3r=(x1r,c_inner_bracket);
163 bot z4l=(x1l,0);
164 mpos(1,4)(Estem,0);
165 bot rt z11=(w-unit,0);
166 top rt z12=(w-.5unit,3unit+ru(2));
167 z13=(.5w+.5unit,y4+Ebotarm);
168 z14=(min(x13,rt x4r+.5unit),y13);
169 rt z21=(w-ru(4),y1);
170 bot z22=(x21,top y1-3.5unit);
171 z23=(ru(19),y1-Etoparm);
172 z24=(rt x1r+.5unit,y23);
173 onaline(1r,4r)(31,35);
174 bot y31=.5h-smallu;
175 y35=y31+Emidarm;
176 rt z33=(w-(3.8unit),.5[y31,y35]);
177 x32=x34=x33;
178 bot y32=bot y31-2.5unit;
179 top y34=bot y32+6unit;
180
181 p1=leftserif(z4,z1,z3l,z3r,ru(4.75),.4)--
182 straightarm.br(z13,z12,z11,Ebot_tip,pullout)--z14{left}...{up}z3r--
183 z2r{up}...{right}z24--straightarm.tr(z23,z22,z21,Emid_tip,pulleven)--
184 leftserif(z1,z4,z2l,z2r,ru(4.75),.4)--cycle;
185 p1'=straightarm.br(z31,z32,z33,Emid_tip,pullin)--
186 straightarm.tr(z35,z34,z33,Emid_tip,pullin);
187
188 showpoints(1,2,3,4,11,12,13,14,21,22,23,24,31,32,33,34,35);
189 draw_outlines;
190 endchar;
191
192
193 iff OK "F": "The letter F"; beginchar("F",(1+10)*unit#,cap#,0);
194
195 top lft z1l=(round(ru(5.5)),h);
196 z2l=(x1l,h-c_thick_stem_bracket);
197 z2r=(x1r,h-c_inner_bracket);
198 z3l=(x1l,c_thick_stem_bracket);
199 z3r=(x1r,c_inner_bracket);
200 bot z4l=(x1l,0);
201 mpos(1,4)(Fstem,0);
202 rt z21=(w-.5unit,y1);
203 bot z22=(x21,top y1-3.5unit);
204 z23=(ru(19),y1-Etoparm);
205 z24=(rt x1r+.5unit,y23);
206 onaline(1r,4r)(31,35);
207 bot y31=.5h-smallu;
208 y35=y31+Emidarm;
209 rt z33=(w-3unit,.5[y31,y35]);
210 x32=x34=x33;
211 bot y32=bot y31-2.5unit;
212 top y34=bot y32+6unit;
213
214 p1=fullserif(z4,z1,z3l,z3r,ru(4.75),ru(6),bracket4)--z2r{up}...{right}z24--
215 straightarm.tr(z23,z22,z21,Emid_tip,pulleven)--
216 leftserif(z1,z4,z2l,z2r,ru(4.75),bracket4)--cycle;
217 p1'=straightarm.br(z31,z32,z33,Emid_tip,pullin)--
218 straightarm.tr(z35,z34,z33,Emid_tip,pullin);
219
220 showpoints(1,2,3,4,21,22,23,24,31,32,33,34,35);
221 draw_outlines;
222 endchar;
223
224
225 iff OK "G": "The letter G"; beginchar("G",(1+13)*unit#,cap#,0);
226
227 bot z2l=(max(7unit,.5w),-Gover);
228 y2r=y2l+Gbotthin;
229 x2r=x2l+(min(Gbotthin,abs(y2r-y2l)));
230 lft z3l=(round ru(2),.5h); pos3(Gcurve,0);
231 top z4l=(x2l,h+Gover);
232 y4r=y4l-Gtopthin;
233 x4r=x4l+(min(.5u,abs(y4r-y4l)));
234 bot rt z5=(w-round(2unit+.5u),h-3unit-ru(2.5));
235 z6=(x5,y4l);
236 z7=z6-(ru(2.5),ru(2.5));
237 top rt z11r=(rt x5+.5u,5unit+.5u);
238 bot z13r=(x11r,unit-2smallu);
239 mpos(11,13)(Gstem,0);
240 onaline(11r,13r)(12r); y12r=max(y11r-c_thick_stem_bracket,y13r);
241 onaline(11l,13l)(12l); y12l=max(y11l-c_thick_stem_bracket,y13r+unit);
242
243 p1=curve.tl(z4l,.5,z3l,.7)--curve.bl(z3l,.7,z2l,.5)--z2l{right}...z13r--
244 fullserif(z11,z13,z12l,z12r,ru(5.5),ru(4.5),bracket0)...{down}z13l...{left}z2r--
245 reversecurve.bl(z3r,.7,z2r,.6)--reversecurve.tl(z4r,.6,z3r,.6)--
246 beak(z4r,z5,z6,z7,z4l,1.2)--cycle;
247
248 showpoints(2,3,4,5,6,7,11,12,13);
249 draw_outlines;
250 endchar;
251
252
253 iff OK "H": "The letter H"; beginchar("H",(1+13)*unit#,cap#,0);
254
255 numeric H_inner_serif_amt;
256 top lft z1l=(round(3.75unit/2),h);
257 z2l=(x1l,h-c_thick_stem_bracket);
258 z3l=(x1l,c_thick_stem_bracket);
259 bot z4l=(x1l,0);
260 top rt z11r=(w-round(3.75unit/2),h);
261 z12r=(x11r,h-c_thick_stem_bracket);
262 z13r=(x11r,c_thick_stem_bracket);
263 bot z14r=(x11r,0);
264 mpos(1,2,3,4,11,12,13,14)(stem,0);
265 onaline(1r,4r)(5l,5r); bot y5l=bot y15l=.5cap-u;
266 onaline(11l,14l)(15l,15r); y5r=y15r=y5l+Hbar;
267 H_inner_serif_amt=ru(4.75);
268 if (x1r+H_inner_serif_amt+.5linethickness)>.5w: % keeps inner serifs
269 H_inner_serif_amt:=.5w-x1r-.5linethickness-1; % from merging
270 fi
271
272 p1=fullserif(z1,z4,z2l,z2r,ru(4.75),H_inner_serif_amt,bracket4)--
273 fullserif(z4,z1,z3l,z3r,ru(4.75),H_inner_serif_amt,bracket4)--cycle;
274 p2=fullserif(z11,z14,z12l,z12r,H_inner_serif_amt,ru(4.75),bracket4)--
275 fullserif(z14,z11,z13l,z13r,H_inner_serif_amt,ru(4.75),bracket4)--cycle;
276 p1'=z5r--z15r--z15l--z5l;
277
278 showpoints(1,2,3,4,5,11,12,13,14,15);
279 draw_outlines;
280 endchar;
281
282
283 iff OK "I": "The letter I"; beginchar("I",(1+6)*unit#,cap#,0);
284
285 top lft z1l=(round((w-stem-linethickness)/2),h);
286 z2l=(x1l,h-c_thick_stem_bracket);
287 z3l=(x1l,c_thick_stem_bracket);
288 bot z4l=(x1l,0);
289 mpos(1,2,3,4)(stem,0);
290
291 p1=fullserif(z1,z4,z2l,z2r,ru(5),ru(5),bracket4)--
292 fullserif(z4,z1,z3l,z3r,ru(5),ru(5),bracket4)--cycle;
293
294 showpoints(1,2,3,4);
295 draw_outlines;
296 endchar;
297
298
299 iff OK "J": "The letter J"; beginchar("J",(2+7)*unit#,cap#,descender#);
300
301 top rt z1r=(round(w-2unit),h);
302 z2r=(x1r,h-c_thick_stem_bracket);
303 z3r=(x1r,2unit);
304 z3l=(x1l,u);
305 mpos(1,2)(stem,0);
306 bot z10r=(w/3,-.45d);
307 z10l=z10r+(-smallu,Jbotthin);
308 lft z12l=(smallu,ru(2)); pos12(Jbulb,0);
309 top z13=(x12,2unit-smallu);
310 ref1=z12r...z12l...cycle;
311 z14= point 1.75 of ref1; z15=direction 1.75 of ref1;
312 z11=(x12r-.5unit,.5[y10l,y14]);
313
314 p1=fullserif(z1,z2,z2l,z2r,ru(5.5),ru(4.75),bracket4)--z3l{down}...z10l{left}...
315 z11{up}...z14{z15}...z12r{up}...z13{left}...z12l{down}... % bulb
316 curve.br(z10r,.65,z3r,.65)--cycle;
317
318 showpoints(1,2,3,10,11,12,13,14,15);
319 draw_outlines;
320 endchar;
321
322
323 iff OK "K": "The letter K"; beginchar("K",(1+13)*unit#,cap#,0);
324
325 numeric K_inner_serif_amt;
326 top lft z11l=(2unit,h);
327 z12l=(x11l,h-c_thick_stem_bracket);
328 z13l=(x11l,c_thick_stem_bracket);
329 bot z14l=(x11l,0);
330 mpos(11,12,13,14)(stem,0);
331 onaline(11r,14r)(3r,4);
332 bot y3r=.4cap;
333 top rt z1r=(w-2unit,cap);
334 mpos(1,3)(Kthin,angle(z1r-z3r)-90);
335 y2l=y2r=cap-Kthin_diag_bracket;
336 onaline(1l,3l)(2l,4);
337 onaline(1r,3r)(2r,21l);
338 onaline(1,3)(0); top y0=cap;
339 bot y21l=y3r+.5unit;
340 bot rt z23r=(w-ru(2),0);
341 mpos(21,23)(Kdiag,angle(z1r-z3r));
342 y22l=y22r=c_thick_stem_bracket;
343 onaline(21l,23l)(22l);
344 onaline(21r,23r)(22r);
345 onaline(21,23)(20); bot y20=0;
346
347 K_inner_serif_amt=ru(4.75);
348 if (x11r+K_inner_serif_amt+.5linethickness)>.5w:
349 K_inner_serif_amt:=.5w-x11r-.5linethickness-1;
350 fi
351
352 p1=fullserif(z11,z14,z12l,z12r,ru(4.75),K_inner_serif_amt,bracket4)--
353 fullserif(z14,z11,z13l,z13r,ru(4.75),K_inner_serif_amt,bracket4)--cycle;
354 p2=z3r--fullserif(z0,z3,z2l,z2r,ru(9),ru(3.5),bracket01)--z4--cycle;
355 p3=z21l--fullserif(z20,z21,z22l,z22r,ru(4),.5unit,bracket32)--z21r--cycle;
356
357 showpoints(0,1,2,3,4,11,12,13,14,20,21,22,23);
358 draw_outlines;
359 endchar;
360
361
362 iff OK "L": "The letter L"; beginchar("L",(1+11)*unit#,cap#,0);
363
364 top lft z1l=(round(ru(5.5)),h);
365 z2l=(x1l,h-c_thick_stem_bracket);
366 z3l=(x1l,c_thick_stem_bracket);
367 z3r=(x1r,c_inner_bracket);
368 bot z4l=(x1l,0);
369 mpos(1,2,4)(Lstem,0);
370 bot rt z11=(w-unit,0);
371 top rt z12=(w-.5unit,4unit);
372 z13=(.5w+.5unit,y4+Lthin);
373 z14=(min(x13,rt x4r+.5unit),y13);
374
375 p1=fullserif(z1,z4,z2l,z2r,ru(4.75),ru(4.5),bracket4)--
376 leftserif(z4,z1,z3l,z3r,ru(4.75),bracket4)--
377 straightarm.br(z13,z12,z11,Ltip,pullout)--z14{left}...{up}z3r--cycle;
378
379 showpoints(1,2,3,4,11,12,13,14);
380 draw_outlines;
381 endchar;
382
383
384 iff OK "M": "The letter M"; beginchar("M",(1+16)*unit#,cap#,0);
385
386 lft x4l=ru(5.6); bot y4=0;
387 rt x14r=w-2unit; bot y14=0;
388 top z1l=(x4l,h);
389 top z11r=(x14r,h);
390 mpos(1,3,4)(Mthin_vert,0);
391 mpos(11,12,13,14)(Mstem,0);
392 onaline(1,4)(3); y12l=h-c_thick_stem_bracket;
393 onaline(11,14)(12,13); y3l=y13l=c_thick_stem_bracket;
394 bot z22=(x1r+.5(x11l-x1r-Mapex),0); pos22(Mapex,0);
395 top z24=(x11l-u,h);
396 top z26=(rt x1r+Mdiag,h);
397 top z25=(.5[x24,x26],3unit+ru(2)); pos25(u,0);
398 bot y23=h-ru(4);
399 (z23-z22r)=whatever*(z24-z25r);
400 bot y21=h-ru(5);
401 (z21-z22l)=whatever*(z26-z25l);
402 onaline(26,25l)(30r,31r); onaline(21,22l)(30l,31l);
403 y30=y30l=y30r=h-.5linethickness; x30=.5[x30l,x30r];
404 y31=y31l=y31r=0; x31=.5[x31l,x31r];
405 ref1=leftserif(z30,z31,z21,z25r,ru(5.5),bracket0)--z22l;
406 z2l=ref1 intersectionpoint ((x3l,0)--(x3l,h));
407 z2r=ref1 intersectionpoint ((x3r,0)--(x3r,h));
408
409 p1=fullserif(z4,z3,z3l,z3r,ru(4.7),ru(5),bracket0)--z2r--z2l--cycle;
410 p2=z22r--z23--(x11l,y24)--z24--z25r--z25l--z26--ref1--cycle;
411 p3=fullserif(z14,z13,z13l,z13r,ru(4.7),ru(5),bracket0)--
412 rightserif(z11,z12,z12l,z12r,ru(4.7),bracket0)--(x11l,y24)--cycle;
413
414 showpoints(1,2,3,4,11,12,13,14,21,22,23,24,25,26,30,31);
415 draw_outlines;
416 endchar;
417
418
419 iff OK "N": "The letter N"; beginchar("N",13unit#,cap#,0);
420
421 bot lft z1l=(round 2unit,0); mpos(1,2,11,12)(Nthin,0);
422 z2=(x1,c_thin_stem_bracket);
423 z3=(x1l,h-ru(4));
424 top rt z11r=(round (w-ru(5.3)),h);
425 z12=(x11,h-c_thin_stem_bracket);
426 bot z22=(x11r,-Napex);
427 z23l=z22-(Ntip,0); mpos(4,23)(Ndiag,angle(z3-z23l)-90);
428 % onaline(1r,2r)(4l); bot z4l=whatever[z3,z23l];
429 onaline(1r,2r)(4l); z4l=whatever[z3,z23l];
430 onaline(11l,12l)(14); onaline(4r,23r)(13,14);
431 top y21=h; z21=whatever[z14,1.05[z4l,z4r]];
432 onaline(4,23)(20); y20=y21;
433 onaline(11r,12r)(13);
434
435 p1=leftserif(z20,z4,z4l,z4r,ru(2.5),bracket0)--z23l--z22--z13--z21--cycle;
436 p1'=z3--fullserif(z1,z2,z2l,z2r,ru(4.7),ru(5),bracket3)--z4l;
437 p2'=z13--fullserif(z11,z12,z12l,z12r,ru(5),ru(4.2),bracket3)--z14;
438
439 showpoints(1,2,3,4,11,12,13,14,20,21,22,23);
440 draw_outlines;
441 endchar;
442
443
444 iff OK "O": "The letter O"; beginchar("O",(1+13)*unit#,cap#,descender#);
445
446 top z1l=(.5w,h+Oover); pos1(Othin,-90);
447 lft z2l=(round(ru(1.8)),.5h); pos2(Ocurve,0);
448 bot z3l=(.5w,-Oover); pos3(Othin,90);
449 rt z4l=(round(w-ru(1.8)),.5h); pos4(Ocurve,180);
450
451 p1=curve.tl(z1l,.5,z2l,.7)--curve.bl(z2l,.7,z3l,.5)--
452 curve.br(z3l,.5,z4l,.7)--curve.tr(z4l,.7,z1l,.5)--cycle;
453 p1''=curve.tl(z1r,.6,z2r,.7)--curve.bl(z2r,.7,z3r,.6)--
454 curve.br(z3r,.6,z4r,.7)--curve.tr(z4r,.7,z1r,.6)--cycle;
455
456 showpoints(1,2,3,4);
457 draw_outlines;
458 endchar;
459
460
461 iff OK "P": "The letter P"; beginchar("P",(1+10)*unit#,cap#,0);
462
463 top lft z1l=(round(ru(5)+smallu),h);
464 z2l=(x1l,h-c_thick_stem_bracket);
465 z2r=(x1r,h-c_round_bracket);
466 z3l=(x1l,c_thick_stem_bracket);
467 z3r=(x1r,c_inner_bracket);
468 bot z4l=(x1l,0);
469 mpos(1,4)(stem,0);
470 z5l=(rt x1r+ru(4),y1);
471 z5r=(rt x1r+ru(3),y1-Pthin);
472 rt z6l=(w-2smallu,.5[y5l,y7l]); pos6(Pcurve,180);
473 onaline(1r,4r)(8l,8r); bot y8l=5.5unit; y8r=y8l+Pmidarm;
474 z7l=(rt x1r+ru(4),y8l-round(.2smallu));
475 z7r=(rt x1r+ru(3),y8l+Pthin);
476
477 p1=leftserif(z1,z4,z2l,z2r,ru(4.5),bracket4)--
478 fullserif(z4,z1,z3l,z3r,ru(4.5),ru(4.8),bracket4)--z8l{right}...
479 curve.br(z7l,.5,z6l,.7)--curve.tr(z6l,.7,z5l,.6)--cycle;
480 p1'=z8l--z8r;
481 p1''=z8r--curve.br(z7r,.6,z6r,.8)--curve.tr(z6r,.8,z5r,.7)...
482 {down}z2r--cycle;
483
484 showpoints(1,2,3,4,5,6,7,8);
485 draw_outlines;
486 endchar;
487
488
489 iff OK "Q": "The letter Q"; beginchar("Q",(1+13)*unit#,cap#,descender#);
490
491 top z1l=(.5w,h+Oover); pos1(Othin,-90);
492 lft z2l=(round(ru(1.8)),.5h); pos2(Ocurve,0);
493 bot z3l=(.5w,-Oover); pos3(Othin,90);
494 rt z4l=(round(w-ru(1.8)),.5h); pos4(Ocurve,180);
495 ref1=curve.bl(z2l,.7,z3l,.5)--curve.br(z3l,.5,z4l,.7);
496 ref2=(.35w,-d)--(.35w,h);
497 ref3=(.35w+stem+2linethickness,-d)--(.35w+stem+2linethickness,h);
498 lft z11=ref1 intersectionpoint ref2;
499 bot rt z13r=(round(w-ru(2.5)),-d+4smallu);
500 bot z12=(.6[x11,x13r],-d-round(2smallu));
501 ref4=z12{right}...z13r;
502 pos13(serif_thickness,angle(z13r-precontrol 1 of ref4)-90);
503 z14=z13l-(ru(3.5),.5u);
504 rt z15=ref1 intersectionpoint ref3;
505
506 p1=curve.tl(z1l,.5,z2l,.7)--ref1--curve.tr(z4l,.7,z1l,.5)--cycle;
507 p1'=z11...z12{right}...z13r--z13l...z14{left}...z15;
508 p1''=curve.tl(z1r,.6,z2r,.7)--curve.bl(z2r,.7,z3r,.6)--
509 curve.br(z3r,.6,z4r,.7)--curve.tr(z4r,.7,z1r,.6)--cycle;
510
511 showpoints(1,2,3,4,11,12,13,14,15);
512 draw_outlines;
513 endchar;
514
515
516 iff OK "R": "The letter R"; beginchar("R",(1+12)*unit#,cap#,0);
517
518 top lft z1l=(round(ru(5)+2smallu),h);
519 z2l=(x1l,h-c_thick_stem_bracket);
520 z2r=(x1r,h-c_round_bracket);
521 z3l=(x1l,c_thick_stem_bracket);
522 z3r=(x1r,c_inner_bracket);
523 bot z4l=(x1l,0);
524 mpos(1,4)(stem,0);
525 z5l=(rt x1r+ru(5),y1);
526 z5r=(rt x1r+ru(3),y1-Rthin);
527 rt z6r=(w-(ru(5.0)),.5[y5l,y8l]); pos6(Rcurve,0);
528 onaline(1r,4r)(8l,8r); bot y8l=5.6unit; y8r=y8l+Rthin;
529 ref1=curve.br(z8l,.5,z6r,.9);
530 ref2=(rt x4r+.5unit,0)--(rt x4r+.5unit,h);
531 ref3=(x4r+stem+2linethickness,0)--(x4r+stem+2linethickness,h);
532 lft z11l=ref1 intersectionpoint ref2;
533 rt z13l=(w-u,y4); pos13(serif_thickness,90);
534 lft z12l=(w-4unit,y13l);
535 z14=z13r-(ru(3),0);
536 top rt z15=ref1 intersectionpoint ref3;
537
538 p1=leftserif(z1,z4,z2l,z2r,ru(4.8),bracket4)--
539 fullserif(z4,z1,z3l,z3r,ru(4.8),ru(4.8),bracket4)--
540 curve.br(z8l,.6,z6r,.9)--curve.tr(z6r,.7,z5l,.5)--cycle;
541 p1'=z8l--z8r;
542 p2'=z11l--z12l--z13l--z13r{left}
543 if lowres:..tension 10.. else:... fi{z15-z14}z15;
544 p1''=z8r--curve.br(z8r,.8,z6l,.9)--curve.tr(z6l,.9,z5r,.5)...
545 {down}z2r--cycle;
546
547 showpoints(1,2,3,4,5,6,8,11,12,13,14,15);
548 draw_outlines;
549 endchar;
550
551
552 iff OK "S": "The letter S"; beginchar("S",10unit#,cap#,0);
553
554 top z1r=(.5w-u,h+Sover_top); pos1(Stopthin,90);
555 rt z3=(w-ru(4),y1r);
556 x4=.3[x3,x1r]; y4=y3-ru(1.5);
557 bot z2=top z3-(0,4unit-smallu);
558 bot z11l=(.5w-u,-Sover_bot); pos11(Sbotthin,90);
559 lft z13=(ru(2),y11l);
560 x14=.3[x13,x11l]; y14=y13+ru(1.5);
561 top z12=bot z13+(0,4.5unit);
562 z21l=(ru(2.5),.73h);
563 y21r=.35[y21l,y1r]; rt x21r=.48[x21l,x1r];
564 z22=(.5w,.52h); pos22(stem,37);
565 z23r=(w-ru(2)-smallu,.28h);
566 y23l=.7[y11l,y23r]; lft x23l=.53[x11l,x23r];
567
568 p1=beak(z1l,z2,z3,z4,z1r,1.2)--curve.tl(z1r,.65,z21l,.65)...
569 z22l...
570 reversecurve.br(z11r,.7,z23l,.7)--
571 beak(z11r,z12,z13,z14,z11l,1.2)--
572 curve.br(z11l,.6,z23r,.6)...1.1[z22l,z22r]...
573 reversecurve.tl(z1l,.6,z21r,.6)--cycle;
574
575 showpoints(1,2,3,4,11,12,13,14,21,22,23);
576 draw_outlines;
577 endchar;
578
579
580 iff OK "T": "The letter T"; beginchar("T",(1+11)*unit#,cap#,0);
581
582 mpos(1,2,3)(stem,0);
583 bot lft z1l=(round((w-stem-linethickness)/2),0);
584 z2l=(x1l,c_thick_stem_bracket);
585 top z4=(x1,h);
586 bot y5l=top y4-(3unit+ru(2)); onaline(1,4)(5);
587 mpos(4,5)(round(w-ru(3.5)-linethickness),0);
588 z3l=(x1l,y4-Tthin);
589
590 p1=straightarm.br(z3r,z5r,z4r,Ttip,pulleven)--
591 straightarm.bl(z3l,z5l,z4l,Ttip,pulleven)--cycle;
592 p1'=z3l--fullserif(z1,z4,z2l,z2r,ru(5.25),ru(5.25),bracket4)--z3r;
593
594 showpoints(1,2,3,4,5);
595 draw_outlines;
596 endchar;
597
598
599 iff OK "U": "The letter U"; beginchar("U",13unit#,cap#,0);
600
601 top lft z1l=(round(ru(5)+smallu),h);
602 z2l=(x1l,h-c_thick_stem_bracket);
603 z3l=(x1l,4unit);
604 top rt z11r=(w-round(ru(5.5)),h);
605 z12r=(x11r,h-Uthin_bracket);
606 z13r=(x11r,4.5unit);
607 mpos(1,2,3)(Ustem,0);
608 mpos(11,12,13)(Uthin,0);
609 bot z10r=(.5w,-Uover);
610 z10l=z10r+(.5unit,Uthin);
611
612 p1=fullserif(z1,z2,z2l,z2r,ru(4.5),ru(5),bracket4)--
613 curve.bl(z3l,.65,z10r,.65)--curve.br(z10r,.65,z13r,.65)--
614 fullserif(z11,z12,z12l,z12r,ru(4.75),ru(4.75),bracket01)--z13l{down}--
615 reversecurve.br(z10l,.65,z13l,.65)--
616 reversecurve.bl(z3r,.7,z10l,.7)--cycle;
617
618 showpoints(1,2,3,10,11,12,13);
619 draw_outlines;
620 endchar;
621
622
623 iff OK "V": "The letter V"; beginchar("V",13unit#,cap#,0);
624
625 bot z20=(.51w,-Vapex); pos20(Vtip,0);
626 top y3=h; z3r=whatever[z20r,(w-round(unit+2smallu),h)];
627 top y6=h; z6l=whatever[z20l,(unit,h)];
628 z20r=z1r; z20l=z4l;
629 mpos(1,3)(Vthin,constant_angle((w-round(unit+2smallu),h),z20r,0));
630 mpos(4,6)(stem,constant_angle((unit,h),z20l,0));
631 onaline(1r,3r)(2r); y2r=h-c_round_bracket;
632 onaline(1l,3l)(2l); y2l=h-c_inner_bracket;
633 onaline(4r,6r)(5r); y5r=h-c_inner_bracket;
634 onaline(4l,6l)(5l); y5l=h-c_thick_stem_bracket;
635 z40=whatever[.8[z1r,z1l],z2l]; z40=whatever[.8[z4l,z4r],z5r];
636
637 p1=z20l--z20r--rightserif(z3,z1,z2l,z2r,ru(3),bracket0)--
638 leftserif(z3,z1,z40,z2r,ru(7),bracket0)--z40--
639 rightserif(z6,z4,z5l,z40,ru(7),bracket32)--
640 leftserif(z6,z4,z5l,z5r,ru(2.5),bracket0)--z20l--cycle;
641
642 showpoints(1,2,3,4,5,6,20,40);
643 draw_outlines;
644 endchar;
645
646
647 iff OK "W": "The letter W"; beginchar("W",(1+17)*unit#,cap#,0);
648
649 bot z20=(.3w,-Wapex); pos20(Wtip,0);
650 top y3=h; z3r=whatever[z20r,(.6w,h)];
651 top y6=h; z6l=whatever[z20l,(unit,h)];
652 z20r=z1r; z20l=z4l;
653 mpos(1,3)(Wleftthin,constant_angle((.6w,h),z20r,0));
654 mpos(4,6)(stem,constant_angle((unit,h),z20l,0));
655 onaline(1r,3r)(2r); y2r=h-c_round_bracket;
656 onaline(1l,3l)(2l); y2l=h-c_inner_bracket;
657 onaline(4r,6r)(5r); y5r=h-c_inner_bracket;
658 onaline(4l,6l)(5l); y5l=h-c_thick_stem_bracket;
659 z40=whatever[.8[z1r,z1l],z2l]; z40=whatever[.8[z4l,z4r],z5r];
660
661 bot z21=(.7w,-Wapex); pos21(Wtip,0);
662 top y13=h; z13r=whatever[z21r,(w-unit,h)];
663 top y16=h; z16l=whatever[z21l,(.44w,h)];
664 z21r=z11r; z21l=z14l;
665 mpos(11,13)(Wrightthin,constant_angle((w-unit,h),z21r,0));
666 mpos(14,16)(stem,constant_angle((.44w,h),z21l,0));
667 onaline(11r,13r)(12r); y12r=h-c_round_bracket;
668 onaline(11l,13l)(12l); y12l=h-c_inner_bracket;
669 onaline(14r,16r)(15r); y15r=h-c_inner_bracket;
670 onaline(14l,16l)(15l); y15l=h-c_thick_stem_bracket;
671 z41=whatever[.8[z11r,z11l],z12l]; z41=whatever[.8[z14l,z14r],z15r];
672
673 ref1=leftserif(z16,z14,z15l,z15r,ru(2.5),bracket0)--z21l;
674 z30=ref1 intersectionpoint (z20r--z3r);
675 z31=ref1 intersectionpoint (z40--z3l);
676
677 p1=z21l--z21r--rightserif(z13,z11,z12l,z12r,ru(2),bracket0)--
678 leftserif(z13,z11,z41,z12r,ru(7),bracket0)--z41--
679 rightserif(z16,z14,z15l,z41,ru(6),bracket32)--
680 ref1--cycle;
681 p2=z20l--z20r--z30--z31--z40--
682 rightserif(z6,z4,z5l,z40,ru(5),bracket32)--
683 leftserif(z6,z4,z5l,z5r,ru(2),bracket0)--z20l--cycle;
684
685 showpoints(1,2,3,4,5,6,11,12,13,14,15,16,20,21,30,31,40,41);
686 draw_outlines;
687 endchar;
688
689
690 iff OK "X": "The letter X"; beginchar("X",13unit#,cap#,0);
691
692 numeric botjoin,topjoin,joinwidths;
693 botjoin=.42h; topjoin=.62h;
694
695 top z1=(.2w,h);
696 bot z3=(.8w,0);
697 z2r=.5[z1r,z3r];
698 mpos(1,3)(Xdiag,constant_angle(z1,z3,0));
699 pos2(.9Xdiag,constant_angle(z1,z3,0));
700 ref1=leftserif(z1,z3,z2l,z2r,ru(2.5),bracket4)...
701 leftserif(z3,z1,z2l,z2r,ru(7),bracket42);
702 ref2=rightserif(z3,z1,z2l,z2r,ru(2),bracket42)--
703 rightserif(z1,z3,z2l,z2r,ru(6),bracket4);
704 bot z4=ref1 intersectionpoint ((0,botjoin)--(w,botjoin));
705 top z9=ref2 intersectionpoint ((0,topjoin)--(w,topjoin));
706 bot z6=(.12w,0); top z7=(.8w,h);
707 mpos(4,6)(Xthin,constant_angle(z4,z6,0));
708 mpos(7,9)(Xthin,constant_angle(z7,z9,0));
709 onaline(4l,6l)(5l); y5l=y5r=Xthin_diag_bracket;
710 onaline(4r,6r)(5r);
711 onaline(7r,9r)(8r); y8r=y8l=h-Xthin_diag_bracket;
712 onaline(7l,9l)(8l);
713 ref3=fullserif(z6,z4,z5l,z5r,ru(2.5),ru(8),bracket01);
714 ref4=z5l--2[z5l,z4l];
715 ref5=fullserif(z7,z9,z8l,z8r,ru(7),ru(5),bracket01);
716 ref6=z8r--2[z8r,z9r];
717 z21=ref1 intersectionpoint (ref3--z4r);
718 z22=ref1 intersectionpoint ref4;
719 z23=ref2 intersectionpoint (ref5--z9l);
720 z24=ref2 intersectionpoint ref6;
721
722 p1=ref1--ref2--cycle;
723 p2=z22--ref3--z21--cycle;
724 p3=z24--ref5--z23--cycle;
725
726 showpoints(1,2,3,4,5,6,7,8,9,21,22,23,24);
727 draw_outlines;
728 endchar;
729
730
731 iff OK "Y": "The letter Y"; beginchar("Y",13unit#,cap#,0);
732
733 bot lft z3l=(5unit,0);
734 z2l=z3l+(0,c_thick_stem_bracket);
735 mpos(2,3)(stem,0);
736 onaline(2l,3l)(1l); y1l=.39h;
737 onaline(2r,3r)(1r); y1r=.45h;
738 top lft z4l=(unit,h);
739 z6l=z1l;
740 mpos(4,6)(Ythick_diag, constant_angle(z4l,z6l,0));
741 onaline(4l,6l)(5l); y5l=y5r=h-c_thick_stem_bracket;
742 onaline(4r,6r)(5r);
743 onaline(4,6)(20); top y20=h;
744 top rt z7r=(w-unit,h);
745 z9r=z1r;
746
747 mpos(7,9)(Ydiag, constant_angle(z7r,z9r,0));
748 onaline(7l,9l)(8l); y8l=y8r=h-Ythin_diag_bracket;
749 onaline(7r,9r)(8r);
750 onaline(7,9)(21); top y21=h;
751
752 ref1=z5r--1.5[z5r,z6r];
753 ref2=z8l--1.5[z8l,z9l];
754 z22=ref1 intersectionpoint ref2;
755
756 p1=fullserif(z20,z6,z5l,z5r,ru(2),ru(4),bracket4)--z1l--
757 fullserif(z3,z2,z2l,z2r,ru(5),ru(5),bracket4)--z1r--
758 fullserif(z21,z9,z8l,z8r,ru(8),ru(2),bracket01)--z22--cycle;
759
760 showpoints(1,2,3,4,5,6,7,8,9,20,21,22);
761 draw_outlines;
762 endchar;
763
764
765 iff OK "Z": "The letter Z"; beginchar("Z",(1+11)*unit#,cap#,0);
766
767 top lft z1=(ru(4)+smallu,h);
768 bot lft z2=(ru(3)+smallu,top y1-3.5unit);
769 z3=(.5w,y1-Zthin);
770 bot lft z5l=(.5unit,0);
771 rt z15r=(w-ru(3)-smallu,y1);
772 mpos(5,15)(Zdiag,constant_angle(z15r,z5l,Zdiag));
773 rt z11=(w-ru(3.2),y5l);
774 top rt z12=(w-ru(1.7),4unit+u);
775 z13=(.55w,y11+Zthin);
776 onaline(5l,15l)(4); y4=y3;
777 onaline(5r,15r)(14); y14=y13;
778
779 p1=straightarm.tl(z3,z2,z1,Ztip,pulleven)--z4--z5l--
780 straightarm.br(z13,z12,z11,Ztip,pulleven)--z14--z15r--cycle;
781
782 showpoints(1,2,3,4,5,11,12,13,14,15);
783 draw_outlines;
784 endchar;
785
786
787
788 % ----- Phase 3 -----
789
790
791 iff OK "k": "The letter k"; beginchar(oct"174",(1+9)*unit#,ascender#,0);
792
793 top lft z11l=(unit+.5u,h);
794 bot z14l=(x11l,0);
795 mpos(11,14)(kstem,0);
796 onaline(11r,14r)(3r,4,12r,13r);
797 bot y3r=.4xheight; y12l=h-lc_thick_stem_bracket; top y12r=h;
798 onaline(11l,14l)(12l,13l);
799 y13l=y13r=lc_thick_stem_bracket;
800 top rt z1r=(w-1.5unit,xheight);
801 mpos(1,3)(kthin,angle(z1r-z3r)-90);
802 y2l=y2r=xheight-k_thin_diag;
803 onaline(1l,3l)(2l,4);
804 onaline(1r,3r)(2r,21l);
805 onaline(1,3)(0); top y0=xheight;
806 y21l=y3r+.5unit;
807 bot rt z23r=(w-ru(2),0);
808 mpos(21,23)(kdiag,angle(z1r-z3r));
809 y22l=y22r=lc_thick_stem_bracket;
810 onaline(21l,23l)(22l);
811 onaline(21r,23r)(22r);
812 onaline(21,23)(20); bot y20=0;
813
814 p1=fullserif(z14,z11,z13l,z13r,ru(2.5),ru(2.5),bracket0)--z12r--
815 leftserif(z11,z14,z12l,z12r,ru(2.5),bracket0)--cycle;
816 p2=z3r--fullserif(z0,z3,z2l,z2r,ru(7),ru(2.5),bracket01)--z4--cycle;
817 p3=z21l--fullserif(z20,z21,z22l,z22r,ru(4),u,bracket32)--z21r--cycle;
818
819 showpoints(0,1,2,3,4,11,12,13,14,20,21,22,23);
820 draw_outlines;
821 endchar;