Debian Codegraph @

texmf-dist/fonts/source/public/fge/fgerm.mf

raw
1 % fgerm.mf : fge roman charcters
2 % J.J. Green 2005-2006
3
4 mode_setup;
5 font_setup;
6
7 proofing := 2;
8
9 % The Russell class -- the class of all classes which
10 % are not members of themselves.
11
12 cmchar "Overturned A";
13 beginchar("A", 13u#, x_height#, desc_depth#);
14 adjust_fit(cap_serif_fit#, cap_serif_fit#);
15
16 numeric left_stem, right_stem, outer_jut, alpha;
17 right_stem = cap_stem-stem_corr;
18 left_stem = min(cap_hair, right_stem);
19 outer_jut = 0.8cap_jut;
20
21 w-x1l = x4r = l+letter_fit+outer_jut+0.5u;
22 y1 = y4 = h;
23 x2-x1 = x4-x3;
24 x3r = x2r+apex_corr;
25 y2 = y3 = -d-apex_o-apex_oo;
26
27 alpha = diag_ratio(2, left_stem, y2-y1, x4r-x1l-apex_corr);
28 penpos1(alpha*left_stem, 180);
29 penpos2(alpha*left_stem, 180);
30 penpos3(alpha*right_stem, 180);
31 penpos4(alpha*right_stem, 180);
32
33 z0=whatever[z1r, z2r]=whatever[z3l, z4l];
34
35 fill z0--diag_end(0, 4l, 1, 1, 4r, 3r)--diag_end(4r, 3r, 1, 1, 2l, 1l)
36 --diag_end(2l, 1l, 1, 1, 1r, 0)--cycle;
37
38 penpos5(whatever, angle(z2-z1)); z5=whatever[z1, z2];
39 penpos6(whatever, angle(z3-z4)); z6=whatever[z3, z4];
40 y6 = y5;
41 y5 = 5/12(h-y0);
42 y5r-y5l = y6r-y6l = cap_band;
43
44 penstroke z5e--z6e; % bar line
45
46 numeric inner_jut;
47
48 % for the reversed serifs it is easier to introduce
49 % new control points which are "the right way around"
50 % since prime_points_inside() and dish_serif()
51 % have the left & right sides of the points hard-coded
52
53 penpos11(alpha*left_stem, 0);
54 penpos12(alpha*left_stem, 0);
55 z11 = z1;
56 z12 = z2;
57
58 penpos13(alpha*right_stem, 0);
59 penpos14(alpha*right_stem, 0);
60 z13 = z3;
61 z14 = z4;
62
63 pickup tiny.nib;
64 prime_points_inside(11, 12);
65 prime_points_inside(14, 13);
66
67 inner_jut = cap_jut;
68
69 dish_serif(11', 12, a, 0.6, inner_jut, b, 1/2, outer_jut)(dark);
70 dish_serif(14', 13, c, 1/3, outer_jut, d, 1/2, inner_jut);
71
72 penlabels(0, 1, 2, 3, 4, 5, 6);
73
74 endchar;
75
76 % rotated eszett
77
78 beginchar(oct "031", 4.5u#+max(4.5u#, .5stem#+flare#+curve#), x_height#, desc_depth#);
79 adjust_fit(0, serif_fit#);
80
81 pickup tiny.nib;
82
83 pos1(stem', 0);
84 pos2(stem', 0);
85
86 rt x1r = rt x2r = hround(w-2.5u+.5stem');
87 top y1 = h;
88 y2 = y4 = 0.5[0, y3];
89
90 penpos3(vair-fine, 270);
91 fine.bot y3r = -d-oo;
92
93 filldraw stroke z1e--z2e; % stem
94
95 numeric stem_edge, curve';
96 stem_edge = lft x1l;
97 curve' = hround .5[stem', curve];
98 pickup fine.nib;
99 pos4(curve', 180);
100 pos5(vair, 90);
101 pos2'(stem', 0);
102 z2' = z2;
103 x3 = 0.5[x2, x4];
104 lft x4r = hround(u);
105 bot y5l = 0;
106 rt x5 = hround(stem_edge-u);
107 filldraw stroke pulled_super_arc.e(2', 3)(.5superpull)
108 & pulled_super_arc.e(3, 4)(.5superpull)
109 & pulled_super_arc.e(4, 5)(.5superpull); % upper bowl
110
111 pos5'(vair, 270);
112 z5' = z5;
113 pos6(curve', 180);
114 pos7(vair, 90);
115 lft x6r = hround(0.5u)+3eps;
116 y6 = .6x_height;
117 top y7r = x_height+oo;
118 pos8(hair, 0);
119 rt x8r = hround(stem_edge-.5u-1);
120 x7 = 0.4[rt x8r, x6];
121 filldraw stroke pulled_super_arc.e(5', 6)(.5superpull)
122 & pulled_super_arc.e(6, 7)(.5superpull); % lower bowl
123
124 pos9(5/7[vair, flare], 0);
125 y9-(x9-lft x9r) = vround 0.93x_height;
126
127 bulb(7, 8, 9); % bulb
128
129 dish_serif(1, 2, b, 0, epsilon, c, 1/3, jut); % serif
130
131 penlabels(0, 1, 2, 3, 4, 5, 6, 7, 8);
132
133 endchar;
134
135 % rotated 2, 3, B, C, taken from romanu.mf
136 %
137 % here we use that
138 % u# := 20/36pt#;
139 % cap_height# := 246/36pt#;
140 % fig_height# := 232/36pt#
141 % and so cap_height/u = 11.6, fig_height/u = 12.3
142
143 cmchar "downward 2";
144 beginchar("2", 14u#, x_height#, 0);
145 adjust_fit(0, 0);
146
147 numeric arm_thickness, hair_vair;
148
149 hair_vair = 0.25[vair, hair];
150 arm_thickness = Vround(if hefty:slab+2stem_corr else:.4[stem, cap_stem] fi);
151
152 pickup crisp.nib;
153
154 pos7(arm_thickness, 0);
155 pos8(hair, 90);
156 rt x7r = hround(w-0.9u);
157 bot y7 = 0;
158 top y8r = h+o/2;
159 x8 = good.x(x7l-beak/2) - eps;
160
161 varm(7, 8, a, 0.3beak_darkness, beak_jut); % arm and beak
162
163 pickup fine.nib;
164
165 pos2(slab, 180);
166 pos3(.4[curve, cap_curve], 90);
167
168 lft x2r = 0.9u;
169 y2 = h/2;
170 top y3r = h+o/2;
171 x3 = x0;
172
173 numeric bulb_diam;
174 bulb_diam=hround(flare+2/3(cap_stem-stem));
175
176 pos0(bulb_diam, -90);
177 pos1(cap_hair, -90);
178
179 bot y0r = -o/2;
180 x1 + 0.5 bulb_diam = 1/3(w-1.8u) + 0.9u;
181 %(x2l, y) = whatever[z1l, z2r];
182 %y2l := y;
183 dlbulb(2, 1, 0); % bulb and arc
184
185 pos4(0.25[hair_vair, cap_stem], 90);
186 pos5(hair_vair, 90);
187 pos6(hair_vair, 90);
188
189 x5 + arm_thickness = w - 0.9u;
190 x4 = 0.3[x5, x3];
191 rt x6 = w - 0.9u - slab;
192 bot y6 = crisp.bot y7;
193
194 z4l = whatever[z6l, (0.50w, y3l)];
195 z5l = whatever[z6l, z4l];
196
197 % erase excess at left
198 erase fill z4l--z6l--bot z6l--(x4l, bot y6l)--cycle;
199
200 % stroke
201 filldraw stroke z2e{up}..tension atleast .9 and atleast 1
202 ..z3e{right}..{z5e-z4e}z4e--z5e--z6e;
203
204 penlabels(0, 1, 2, 3, 4, 5, 6, 7, 8);
205 endchar;
206
207 cmchar "upward 2";
208 beginchar("4", 14u#, x_height#, 0);
209 adjust_fit(0, 0);
210
211 numeric arm_thickness, hair_vair;
212
213 hair_vair = 0.25[vair, hair];
214 arm_thickness = Vround(if hefty:slab+2stem_corr else:.4[stem, cap_stem] fi);
215
216 pickup crisp.nib;
217
218 pos7(arm_thickness, 180);
219 pos8(hair, -90);
220 lft x7r = hround(0.9u);
221 top y7 = h;
222 bot y8r = -o/2;
223 x8 = good.x(x7l+beak/2) + eps;
224
225 varm(7, 8, a, .3beak_darkness, -beak_jut); % arm and beak
226
227 pickup fine.nib;
228
229 pos2(slab, 0);
230 pos3(.4[curve, cap_curve], -90);
231
232 rt x2r = w-0.9u;
233 y2 = h/2;
234 bot y3r = -o/2;
235 x3 = x0;
236
237 numeric bulb_diam;
238 bulb_diam=hround(flare+2/3(cap_stem-stem));
239
240 pos0(bulb_diam, 90);
241 pos1(cap_hair, 90);
242
243 top y0r = h+o/2;
244 x1 - 0.5 bulb_diam = 2/3(w-1.8u) + 0.9u;
245 %(x2l, y) = whatever[z1l, z2r];
246 %y2l := y;
247 dlbulb(2, 1, 0); % bulb and arc
248
249 pos4(0.25[hair_vair, cap_stem], -90);
250 pos5(hair_vair, -90);
251 pos6(hair_vair, -90);
252
253 x5 = arm_thickness + 0.9u;
254 x4 = 0.3[x5, x3];
255 lft x6 = 0.9u + slab;
256 top y6 = crisp.top y7;
257
258 z4l = whatever[z6l, (0.50w, y3l)];
259 z5l = whatever[z6l, z4l];
260
261 erase fill z4l--z6l--top z6l--(x4l, top y6l)--cycle;
262
263 % stroke
264 filldraw stroke z2e{down}..tension atleast .9 and atleast 1
265 ..z3e{left}..{z5e-z4e}z4e--z5e--z6e;
266
267 penlabels(0, 1, 2, 3, 4, 5, 6, 7, 8);
268 endchar;
269
270 cmchar "downward 3";
271 beginchar("3", 14u#, x_height#, 0);
272 adjust_fit(0, 0);
273
274 numeric top_thickness, mid_thickness, bot_thickness;
275
276 top_thickness=max(fine.breadth, vround(slab-2vair_corr));
277 mid_thickness=max(fine.breadth, vround 2/3vair);
278 bot_thickness=max(fine.breadth, vround(slab-vair_corr));
279
280 pickup fine.nib;
281
282 pos2(top_thickness, 180);
283 lft x2r = 0.9u;
284
285 pos3(max(fine.breadth, .6[curve, cap_curve]-stem_corr), 90);
286 top y3r=hround(h-0.75u+o);
287
288 pos4(vair, 0);
289 pos5(vair, 0);
290 pos6(mid_thickness, 180);
291 y2 = y6 = y8 = 0.5[0.75u, y7];
292
293 pos7(cap_curve, 90);
294 top y7r = hround(h+o);
295 bot y5 = min(vround 3u, bot y6)-eps;
296
297 pos8(bot_thickness, 0);
298 rt x8r = w-0.9u;
299
300 x3 = 0.55[lft x4l, rt x2l];
301 x7 = 0.5[lft x6l, rt x8l];
302 lft x5l = hround(0.9u+.46(w-1.8u)-0.5vair);
303
304 x5r = x6l;
305
306 y4 = 1/3[y5, y3l];
307 z4 = z5 + whatever*(-0.1fig_height, 15u);
308
309 filldraw stroke pulled_super_arc.e(2, 3)(.5superpull)
310 & z3e{right}...z4e---z5e; % upper bowl
311 filldraw z5r--z6l--z6r--z5l---cycle; % middle tip
312 filldraw stroke pulled_super_arc.e(6, 7)(.5superpull)
313 & pulled_super_arc.e(7, 8)(.5superpull); % lower bowl
314
315 numeric bulb_diam[];
316
317 bulb_diam1 = flare + 0.5(cap_stem-stem);
318 bulb_diam2 = flare + cap_stem-stem;
319
320 pos0(bulb_diam1, -90);
321 pos1(hair, -90);
322 lft y0r = hround 0.25u;
323 x0 = x3;
324
325 dlbulb(2, 1, 0); % upper bulb
326
327 pos10(bulb_diam2, 270);
328 pos9(cap_hair, -90);
329 bot y10r = hround(-0.25u);
330
331 x10 = 0.9u + 0.7(w-1.8u) + 0.5bulb_diam2;
332
333 drbulb(8, 9, 10); % lower bulb
334
335 penlabels(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
336 endchar;
337
338 cmchar "upward B";
339 beginchar("D", 13u#, x_height#, 0);
340
341 numeric left_stem, right_curve, middle_weight;
342 left_stem = cap_stem - hround 2stem_corr;
343 middle_weight = 0.6vair + 0.5;
344
345 pickup tiny.nib;
346
347 pos1(left_stem, -90);
348 pos2(left_stem, -90);
349 bot y1r = bot y2r = 0;
350 lft x1 = u;
351 rt x2 = w-u;
352 filldraw stroke z1e--z2e; % stem
353
354 penpos3(cap_band, 180);
355 penpos4(cap_band, 180);
356 penpos6(middle_weight, 0);
357 penpos7(middle_weight, 0);
358 penpos8(middle_weight, 180);
359 penpos9(middle_weight, 180);
360 penpos5(right_curve-stem_corr, 90);
361 penpos10(right_curve, 90);
362 penpos11(cap_band, 0);
363 penpos12(cap_band, 0);
364
365 z3r = lft z1;
366 x4 = x3;
367 x5 = 0.5[x4, x6];
368 x6 = x7;
369 x8l-x7l = vair;
370 z12r = rt z2;
371 x11 = x12;
372 x10 = 0.5[x11, x9];
373 x8 = x9;
374 0.5[x7l, x8l] = u+0.48(w-2u);
375 y4 = y6;
376 y9 = y11 = y4+0.5u;
377 y7 = y8 = y1;
378 y9l := y4+0.25u;
379 y5r = vround(h+o-0.5u);
380 y10r = vround(h+o);
381
382 right_curve = cap_curve-stem_corr;
383 y4 = 0.45[y1, h+o];
384
385 y6l := y6l-0.5u;
386 y11l := y11l-0.5u;
387
388 fill stroke z3e..super_arc.e(4, 5) & super_arc.e(5, 6)..z7e; % upper lobe
389 fill stroke z8e..super_arc.e(9, 10) & super_arc.e(10, 11)..z12e; % lower lobe
390
391 hserif(1, 2, a, 1/3, -cap_jut);
392 hserif(1, 2, b, 1/3, 1/2cap_jut);
393 hserif(2, 1, c, 1/3, -cap_jut);
394 hserif(2, 1, d, 1/3, 1/2cap_jut);
395
396 math_fit(0, 0.5ic#);
397 penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
398
399 endchar;
400
401 cmchar "downward B";
402 beginchar("B", 13u#, x_height#, 0);
403
404 numeric left_stem, right_curve, middle_weight;
405 left_stem = cap_stem - hround 2stem_corr;
406 middle_weight = 0.6vair + 0.5;
407
408 pickup tiny.nib;
409
410 pos1(left_stem, -90);
411 pos2(left_stem, -90);
412 top y1l = top y2l = h;
413 rt x1 = w-u;
414 lft x2 = u;
415 filldraw stroke z1e--z2e; % stem
416
417 penpos3(cap_band, 0);
418 penpos4(cap_band, 0);
419 penpos6(middle_weight, 180);
420 penpos7(middle_weight, 180);
421 penpos8(middle_weight, 0);
422 penpos9(middle_weight, 0);
423 penpos5(right_curve-stem_corr, -90);
424 penpos10(right_curve, -90);
425 penpos11(cap_band, 180);
426 penpos12(cap_band, 180);
427
428 z3r = rt z1;
429 x4 = x3;
430 x5 = 0.5[x4, x6];
431 x6 = x7;
432 x7l-x8l = vair;
433 z12r = lft z2;
434 x11 = x12;
435 x10 = 0.5[x11, x9];
436 x8 = x9;
437 0.5[x7l, x8l] = u+0.52(w-2u);
438 y4 = y6;
439 y9 = y11 = y4-0.5u;
440 y7 = y8 = y1;
441 y9l := y4+0.25u;
442 y5r = vround(0.5u-o);
443 y10r = vround(-o);
444
445 right_curve = cap_curve-stem_corr;
446 y4 = 0.45[y1, -o];
447
448 y6l := y6l+0.5u;
449 y11l := y11l+0.5u;
450
451 fill stroke z3e..super_arc.e(4, 5) & super_arc.e(5, 6)..z7e; % upper lobe
452 fill stroke z8e..super_arc.e(9, 10) & super_arc.e(10, 11)..z12e; % lower lobe
453
454 hserif(1, 2, a, 1/3, cap_jut);
455 hserif(1, 2, b, 1/3, -1/2cap_jut);
456 hserif(2, 1, c, 1/3, cap_jut);
457 hserif(2, 1, d, 1/3, -1/2cap_jut);
458
459 math_fit(0, 0.5ic#);
460 penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
461
462 endchar;
463
464 % unlike the others there is no way to squeeze the
465 % rotated C to an x-height character, nor cap-height.
466 % So although on the baseline, this rather awkwardly
467 % ascends half way between them
468
469 cmchar "upward C";
470 beginchar("C", 13u#, cap_height#, 0);
471 adjust_fit(0, 0);
472
473 pickup fine.nib;
474
475 pos1(cap_hair, 90);
476 pos2(cap_band, 180);
477 pos3(cap_curve, -90);
478 pos4(cap_band, 0);
479 pos5(hair, 90);
480
481 top y1r = top y5r = 0.5[x_height, h];
482 bot y3r = -o;
483 y2 = y4 = 0.55[y3, y1];
484
485 lft x2r = u;
486 rt x4r = hround(w-u);
487 x3 = 0.5[x2, x4];
488
489 rt x1 = u + 0.4(w-2u);
490 lft x5 = w - u - 0.95(x1-u);
491 (x2l, y2l') = whatever[z2r, z1l]; y2l := min(y2l', y2l+.5u);
492 (x4l, y4l') = whatever[z4r, z5l]; y4l := min(y4l', y4l+.5u);
493 filldraw stroke z1e{10(x2-x1), y2-y1}
494 ...pulled_arc.e(2, 3) & pulled_arc.e(3, 4)...{left}z5e; % arc
495
496 pos6(0.3[fine.breadth, cap_hair], 90);
497 y6r = y1r;
498 lft x6 = u;
499 y1r-y1'=2cap_curve-fine;
500 x1'=x1;
501
502 path upper_arc;
503
504 upper_arc=z1{10(x2-x1), y2-y1}..z2{down};
505
506 numeric t;
507
508 t = xpart(upper_arc intersectiontimes (z6l--z1'));
509
510 filldraw z1r--z6r--z6l--subpath(t, 0) of upper_arc--cycle; % barb
511
512 math_fit(-.3cap_height#*slant-.5u#, .5ic#);
513 penlabels(1, 1', 2, 3, 4, 5, 6);
514 endchar;
515
516 % fletched arrows, which are 4u longer than the cm
517 % right and up arrows. These are not identical -- the
518 % head on the upward arrow is slighty wider than the
519 % rightward
520
521 numeric fwdt, fjut, fang;
522
523 fwdt := 2/3 rule_thickness;
524 fjut := 1.3;
525 fang := 60;
526
527 vardef fletch(suffix $, $$, @) =
528 fletchLR($, $$, @, fang, 90, fwdt, fjut);
529 fletchLR($, $$, @', -fang, -90, fwdt, fjut);
530 enddef;
531
532 vardef fletchLR(suffix $, $$, @)(expr a, r, wdt, len) =
533 numeric b, c;
534 b := angle(z$$-z$);
535 z@1 = z$ + len * ((z$$-z$) rotated a);
536 z@2 = z@1 + whatever*((z$ - z@1) rotated r);
537 z@2 = z$$ + whatever*((z$$ - z$) rotated a);
538 z@3 = z@4 = z$;
539 c := angle(z@1-z@2);
540 penpos@1(wdt, c);
541 penpos@2(wdt, c+180);
542 penpos@3(wdt, b-r);
543 penpos@4(wdt, b+180);
544 penstroke z@[email protected]@2e{z$-z@1}...{z$-z$$}z@3e;
545 penlabels(@1, @2, @3);
546 enddef;
547
548 cmchar "Upward arrow with fletching";
549 beginchar(oct "042", 8u#, asc_height#+2u#, asc_depth#+2u#);
550 adjust_fit(0, 0);
551
552 pickup crisp.nib;
553
554 pos1(rule_thickness, 0);
555 pos2(rule_thickness, 0);
556 pos3(rule_thickness, 90);
557 pos4(rule_thickness, 90);
558
559 numeric headh, headw;
560
561 headw := (w-u)/2+eps;
562 headh := 0.36*w/(9u)*asc_height+eps;
563
564 lft x1l = hround(0.5w - 0.5rule_thickness);
565
566 x0 = x1 = x2;
567 top y0 = h;
568 x0-x3 = x4-x0 = headw;
569 y3 = y4 = y0 - headh;
570
571 pos5(rule_thickness, angle(z4-z0));
572 z5l=z0;
573
574 pos6(rule_thickness, angle(z3-z0));
575 z6l=z0;
576 z9 = 0.2[0.5[z3, z4], z0];
577
578 numeric rake;
579
580 rake = y5l - y3r;
581
582 y1 - 0.5 rule_thickness - rake = -d;
583
584 numeric t; path p;
585
586 p=z4l{z9-z4}..z6r;
587 t=xpart(p intersectiontimes((x2r, -d)--(x2r, h))); y2=ypart point t of p;
588
589 filldraw z0..{z4-z9}z4r--subpath (0, t) of\\(z4l{z9-z4}..z6r)
590 ---z1r---z1l---subpath (t, 0) of\\(z3l{z9-z3}..z5r)
591 --z3r{z9-z3}..z0 & cycle; % arrowhead and stem
592
593 penlabels(0, 2, 3, 4, 5, 6, 9);
594
595 % fletching
596
597 x10 = x11 = x12 = x13 = x1;
598 y11-y10 = y12-y11 = y13-y12 = 3/5rake; % fletch separation
599 y11 = y1;
600
601 fletch(11, 10, a);
602 fletch(12, 11, b);
603 fletch(13, 12, c);
604
605 labels(10, 11, 12, 13);
606
607 endchar;
608
609 cmchar "Rightward arrow with fletching";
610 compute_spread(0.45x_height#, 0.55x_height#);
611 beginchar(oct "041", 22u#, v_center(spread#+rule_thickness#));
612 adjust_fit(0, 0);
613
614 pickup crisp.nib;
615
616 pos1(rule_thickness, 90);
617 pos2(rule_thickness, 90);
618 pos3(rule_thickness, 0);
619 pos4(rule_thickness, 0);
620
621 y0 = y1 = y2 = math_axis;
622 rt x0 = hround(w-u);
623
624 numeric headw, headh;
625
626 headw = 0.26 asc_height+eps;
627 headh = 4u + eps;
628
629 y3-y0 = y0-y4 = headw;
630 x3 = x4 = x0 - headh;
631
632 pos5(rule_thickness, angle(z4-z0));
633 pos6(rule_thickness, angle(z3-z0));
634
635 z5l = z0;
636 z6l = z0;
637 z9 = 0.2[0.5[z3, z4], z0];
638
639 numeric rake;
640
641 rake = x5l - x3r;
642
643 x1 = hround(2u + 3/5rake);
644
645 numeric t; path p; p=z4l{z9-z4}..z6r;
646
647 t=xpart(p intersectiontimes((0, y2l)--(w, y2l))); x2=xpart point t of p;
648
649 filldraw z0..{z4-z9}z4r--subpath (0, t) of\\(z4l{z9-z4}..z6r)
650 ---z1l---z1r---subpath (t, 0) of\\(z3l{z9-z3}..z5r)
651 --z3r{z9-z3}..z0 & cycle; % arrowhead and stem
652
653 penlabels(0, 1, 2, 3, 4, 5, 6, 9);
654
655 % fletching
656
657 y10 = y11 = y12 = y13 = math_axis;
658
659 x11-x10 = x12-x11 = x13-x12 = 3/5rake;
660 x11 = hround x1;
661
662 fletch(11, 10, a);
663 fletch(12, 11, b);
664 fletch(13, 12, c);
665
666 labels(10, 11, 12, 13);
667
668 endchar;
669
670 % these struckout numerals are lifted directly from
671 % romand.mf, with the strikeout added at the end
672
673 cmchar "Reverse struckout 0";
674 beginchar("0", 9u#, fig_height#, 0);
675 adjust_fit(0, 0);
676
677 penpos1(vair, 90);
678 penpos3(vair, -90);
679 penpos2(curve, 180);
680 penpos4(curve, 0);
681
682 interim superness := sqrt(more_super*hein_super);
683
684 x2r = hround max(.7u, 1.45u-.5curve);
685 x4r = w-x2r;
686 x1 = x3 = 0.5w;
687 y1r = h+o;
688 y3r = -o;
689 y2=y4 = 0.5h-vair_corr;
690 y2l := y4l := 0.52h;
691
692 penstroke pulled_arc.e(1, 2)
693 & pulled_arc.e(2, 3)
694 & pulled_arc.e(3, 4)
695 & pulled_arc.e(4, 1) & cycle; % bowl
696
697 penlabels(1, 2, 3, 4);
698
699 % the strikeout
700
701 pickup rule.nib;
702
703 bot y5 = 0;
704 top y6 = y1r + y3r;
705 x5 = x4r;
706 x6 = x2r;
707
708 draw z5--z6;
709 labels(5, 6);
710
711 endchar;
712
713 cmchar "Reverse struckout 1";
714 beginchar("1", 9u#, fig_height#, 0);
715 adjust_fit(0, 0);
716
717 numeric light_stem;
718 light_stem=hround .4[stem', cap_stem'];
719
720 pickup tiny.nib;
721 pos1(light_stem, 0);
722 pos2(light_stem, 0);
723
724 lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem');
725 top y1=h+o;
726 bot y2=0;
727
728 filldraw stroke z1e--z2e; % stem
729
730 if not serifs: save slab; slab=bar; fi
731
732 dish_serif(2, 1, a, 1/3, min(2.25u, lft x2l-1.5u),
733 b, 1/3, min(2.25u, w-1.25u-rt x2r)); % serif
734
735 pickup crisp.nib;
736
737 pos3(slab, -90);
738 pos4(bar, -90);
739
740 top y3l=h+o;
741 top y4l=if monospace: .8 else: .9 fi\\ h+o;
742
743 lft x4=max(1.25u, tiny.lft x1l-2.35u);
744 tiny.rt x1r=lft x3+.25[tiny, hair];
745
746 erase fill z3l{x4l-x3l, 3(y4l-y3l)}...z4l{left}
747 --(x4l, h+o+1)--(x3l, h+o+1)--cycle; % erase excess at top
748
749 filldraw stroke z3e{x4e-x3e, 3(y4e-y3e)}..z4e{left}; % point
750
751 penlabels(1, 2, 3, 4);
752
753 % the strikeout -- possible raise z6 a little
754
755 pickup rule.nib;
756
757 y4r - top y5 = bot y6 - y2;
758 top y5 = x_height;
759 x5 = w-x6 = x4;
760
761 draw z5--z6;
762
763 labels(5, 6);
764
765 endchar;
766
767 % this is used with \mathaccent, but unlike the computer modern
768 % math accents it starts on the baseline, rather than at x_height.
769 % Knuth uses some dark magic in the cm sources to place this
770 % correctly with respect to the character to be accented, I couldn't
771 % reproduce it. So, this is like the cm accents, but with x_height
772 % subtracted from the heights
773 %
774 % This rather nice version (much better than my effort) was taken
775 % from ibyacc4.mf, part of the ibycus font for classical greek by
776 % Pierre A. MacKay, from work by Silvio Levy's realization of a
777 % classic Didot cut of Greek type from around 1800.
778
779 def smooth(suffix $, @)(expr dot_size, depth, shear) =
780 pickup fine.nib;
781
782 pos$(dot_size, 90);
783 pos@1(vair, 90);
784 pos@2(vair, 0);
785 pos@3(vair, -90);
786
787 z@1r = z$r;
788 y@1l := y$;
789 rt x@2r = hround(x$ + 0.5 depth + 0.5 shear);
790 x@3 - 0.5 vair = hround(x$ - 0.5 dot_size + shear);
791 y@2 = 0.5[y@1, y@3];
792 bot y@3r = vround(top y@1r - depth);
793
794 path pp;
795 pp = (z@2{down}...z@3);
796
797 % position a vertical path through the right side of the bulb
798 x@1' = x@1 + 0.5 dot_size;
799
800 % At the intersection of that path with SL's tail, get the direction
801 pair d@@;
802 d@@ = (direction (xpart(
803 (z@2{down}...z@3)
804 intersectiontimes
805 ((x@1', 0){up}--(x@1', y@1))))
806 of (z@2{down}...z@3));
807
808 % Tilt a pen at a right angle to that direction
809 pos@3'(vair, angle(d@@) + 90);
810
811 % Place it at the intersection. This will be the new end of the tail.
812 z@3' = directionpoint d@@ of(z@2{down}...z@3);
813 y_ := ypart((z@1{right}...z@2{down}...z@3)
814 intersectiontimes (z$l{right}..{left}z$r));
815 if y_ < 0:
816 y_ := 1;
817 fi
818 filldraw z$r{left}..subpath (0, y_) of (z$l{right}..{left}z$r)--cycle; % dot
819 filldraw stroke z@1e{right}...z@2e{down}...{d@@}z@3'e;
820
821 penlabels(@1, @2, @3);
822 enddef;
823
824 def rough(suffix $, @)(expr dot_size, depth, shear) =
825 pickup fine.nib;
826
827 pos$(dot_size, 90);
828 pos@1(vair, 90);
829 pos@2(vair, 180);
830 pos@3(vair, -90);
831
832 z@1r = z$r;
833 y@1l := y$;
834 lft x@2r = hround(x$ - 0.5 depth + 0.5 shear);
835 x@3 + 0.5 vair = x$ + 0.5 dot_size + shear;
836 y@2 = 0.5 [y@1, y@3];
837 bot y@3r = vround(top y@1r - depth);
838
839 % position a vertical path through the left side of the bulb
840 x@1' = x@1 - 0.5 dot_size;
841
842 % At the intersection of that path with SL's tail, get the direction
843 pair d@@;
844 d@@ = ( direction (xpart( (z@2{down}...z@3)
845 intersectiontimes
846 ((x@1', 0){up}--(x@1', y@1))))
847 of (z@2{down}...z@3));
848
849 % Tilt a pen at a right angle to that direction
850 pos@3'(vair, angle(d@@) - 90);
851
852 % Place it at the intersection. This will be the new end of the tail.
853 z@3' = directionpoint d@@ of(z@2{down}...z@3);
854 y_ := ypart((z@1{left}...z@2{down}...z@3)
855 intersectiontimes (z$l{left}..{right}z$r));
856 if y_ < 0:
857 y_ := 1;
858 fi
859 filldraw z$r{right}..subpath (0,y_) of (z$l{left}..{right}z$r)--cycle; % dot
860 filldraw stroke z@1e{left}...z@2e{down}...{d@@}z@3'e;
861
862 penlabels(@1, @2, @3);
863 enddef;
864
865 cmchar "Spiritus Lenis accent (tailed)";
866 beginchar(oct "025", 9u#, min(asc_height#-x_height#, x_height#), 0);
867
868 adjust_fit(0, 0);
869
870 numeric dot_diam#;
871 dot_diam# = 3/4dot_size#;
872 define_whole_blacker_pixels(dot_diam);
873
874 x1 = 0.5w - o;
875 y1 = h;
876
877 smooth(1, a, dot_size, 3/4h, 0);
878
879 endchar;
880
881 % this is my effort -- closer to the form used by Pohl,
882 % a blunted crecent.
883
884 cmchar "Spiritus Lenis accent (crescent)";
885 beginchar(oct "026", 9u#, min(asc_height#-x_height#, x_height#), 0);
886
887 numeric rake;
888
889 rake = 10;
890
891 penpos1(hair, 270+rake);
892 penpos2(0.3[hair, stem], 180);
893 penpos3(hair, 90-rake);
894
895 x1 = x3 = 0.5w - o;
896 y1 = h;
897 y3l = max(h/3, o+hair);
898 y2+y2 = y1+y3;
899 x2 - x1 = 0.65*(y1-y3);
900
901 penstroke z1e{dir(rake)}..z2e..{dir(180-rake)}z3e;
902
903 penlabels(1, 2, 3);
904
905 endchar;
906
907 cmchar "Spiritus Asper accent (tailed)";
908 beginchar(oct "023", 9u#, min(asc_height#-x_height#, x_height#), 0);
909
910 adjust_fit(0, 0);
911
912 numeric dot_diam#;
913 dot_diam# = 3/4dot_size#;
914 define_whole_blacker_pixels(dot_diam);
915
916 x1 = 0.5w - o;
917 y1 = h;
918
919 rough(1, a, dot_size, 3/4h, 0);
920
921 endchar;
922
923 cmchar "Spiritus Asper accent (crescent)";
924 beginchar(oct "024", 9u#, min(asc_height#-x_height#, x_height#), 0);
925
926 numeric rake;
927
928 rake = 10;
929
930 penpos1(hair, 90-rake);
931 penpos2(0.3[hair, stem], 180);
932 penpos3(hair, 270+rake);
933
934 x1 = x3 = 0.5w - o;
935 y1 = h;
936 y3r = max(h/3, o+hair);
937 y2+y2 = y1+y3;
938 x1 - x2 = 0.65*(y1-y3);
939
940 penstroke z1e{dir(180-rake)}..z2e..{dir(rake)}z3e;
941
942 penlabels(1, 2, 3);
943
944 endchar;
945
946 % This is the archaic long s with mid bar, used by
947 % Frege as the successor functon. The upright stroke
948 % is that of Computer Modern's f, but the bar runs
949 % along the math-axis rather than the x-height.
950
951 cmchar "Long s with midline bar";
952 beginchar("s", 5.5u#, asc_height#, 0);
953 adjust_fit(0, 0);
954
955 pickup tiny.nib;
956 pos1(stem', 0);
957 lft x1l = hround(2.5u-0.5stem');
958
959 pickup fine.nib;
960 numeric bulb_diam;
961 bulb_diam = hround 0.8[stem, flare];
962 pos2(bulb_diam, 0);
963 y2 + 0.5bulb_diam = 0.9[x_height, h+oo];
964 lft x2l = hround(w-0.75u+0.5);
965
966 f_stroke(1, 2, a, b, c, jut, 1.25jut);
967
968 pickup crisp.nib;
969 pos3(bar, 90);
970 pos4(bar, 90);
971 y3 = y4 = math_axis;
972 lft x3 = hround(0.5u - 1);
973 rt x4 = hround(w - 1/3u);
974
975 filldraw stroke z3e--z4e;
976
977 penlabels(1, 2, 3, 4);
978
979 endchar;
980
981 cmchar "Roman U with flourish";
982 beginchar("U", 15u#, cap_height#, desc_depth#);
983 adjust_fit(cap_serif_fit#, cap_serif_fit#);
984
985 numeric colsep;
986
987 % distance between columns
988
989 colsep := 0.20h;
990
991 pickup fine.nib;
992
993 % 4-1-2-3-5 is the main part of the U
994
995 pos1(cap_stem, 180);
996 pos2(0.25[cap_hair, cap_stem], 270);
997 pos3(cap_hair, 0);
998 pos4(cap_stem, 180);
999 pos5(cap_hair, 0);
1000
1001 x1r = w-x3r;
1002 x3l - x1l = colsep;
1003
1004 x4 = x1;
1005 x3 = x5;
1006
1007 x2 = 0.5(x1l+x3l);
1008 y1 = y3 = 0.5(x3-x1)-d;
1009 y2r = -d-o;
1010
1011 % 6 & 7 control the bulb on the right arm of the U
1012 % note that the top of the bulb is aligned with the
1013 % height, not h+o -- that is on purpose
1014
1015 pos6(cap_hair, 270);
1016 pos7(cap_stem, 90);
1017
1018 y4l = 0.72h;
1019 y5l = 0.82h;
1020
1021 x6 = x5 + 0.6colsep;
1022 y6l = h;
1023
1024 filldraw stroke z4e..z1e{down}..z2e{right}..z3e{up}..z5e;
1025 vbulb(5, 6, 7);
1026
1027 % 9-10-11-12 is the flourish
1028
1029 pos9(cap_hair, 270);
1030
1031 bot y9r = bot y10r = 0;
1032 x9l = w-x10r = 0.5u;
1033
1034 pos11(cap_hair, 50);
1035 pos12(0.25[cap_hair, cap_stem], 270);
1036
1037 x11l = x12 = x4 - 0.9colsep;
1038 y11 = y4;
1039 y12l = h+o;
1040
1041 z11l-z10l = whatever*(z11r-z10r);
1042 z9l-z10l = whatever*(z9r-z10r);
1043
1044 z10 = 0.5[z10l, z10r];
1045
1046 % the curved stroke from the left arm of the U
1047
1048 filldraw stroke z4e{up}..{left}z12e..{z10-z11}z11e;
1049
1050 % the flourish itself
1051
1052 filldraw stroke z9e--z10e;
1053 filldraw stroke z10e--z11e;
1054
1055 penlabels(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12);
1056
1057 endchar;
1058
1059 % overturned c with spur; this is a modified version of
1060 % the code in romanl.mf
1061 %
1062 % not sure I'm entirely happy with the spur
1063
1064 cmchar "Overturned c with spur";
1065 beginchar("c", 8u#, asc_height#, 0);
1066 adjust_fit(0, 0);
1067
1068 pickup fine.nib;
1069
1070 pos2(vair', 270);
1071 pos4(vair', 90);
1072
1073 x2 = x4 = 0.5(w-u);
1074 bot y2r = -oo;
1075 top y4r = vround(x_height + 1.5oo);
1076
1077 pos3(curve, 0);
1078
1079 rt x3r = w - hround max(0.6u, 1.35u - 0.5curve);
1080 y3 = 0.5x_height;
1081
1082 pos1(hair, 180);
1083 pos0(flare, 180);
1084
1085 y1 = x_height -
1086 min(bar_height + 0.5flare + 2vair' + 2,
1087 0.9[bar_height, x_height] - 0.5flare);
1088
1089 lft x1r = 0.7u;
1090
1091 bulb(2, 1, 0);
1092
1093 pos5(hair, 180);
1094 lft x5r = 0.5u;
1095 y5 = x_height - max(good.y(0.5bar_height-0.9), x_height-y4l-vair');
1096 (x, y4l) = whatever[z4r, z5l];
1097 x4l := min(x, x4l+.5u);
1098
1099 filldraw stroke pulled_super_arc.e(2, 3)(0.7superpull)
1100 & pulled_super_arc.e(3, 4)(0.5superpull)
1101 ..tension .9 and 1..{x5-x4, 5(y5-y4)}z5e;
1102
1103 path pth;
1104 numeric tp, theta;
1105
1106 theta = 25;
1107
1108 pos6(stem, theta-90);
1109 pos7(hair, 90+theta);
1110
1111 top y6l = asc_height;
1112
1113 pth = z4{left}..tension .9 and 1..{x5-x4, 5(y5-y4)}z5;
1114
1115 z7 = directionpoint dir(180+theta) of pth;
1116 x6 = x7;
1117
1118 filldraw stroke z7e{dir(theta)}..{dir(180+theta)}z6e;
1119
1120 penlabels(0, 1, 2, 3, 4, 5, 6, 7);
1121
1122 endchar;
1123
1124 cmchar "Overturned e with spur";
1125 beginchar("e", 7.25u#+max(0.75u#, 0.5curve#), asc_height#, 0);
1126 adjust_fit(0, 0);
1127
1128 numeric left_curve, right_curve, rbar_height;
1129
1130 rbar_height = x_height - bar_height;
1131
1132 left_curve + 6stem_corr = right_curve = curve;
1133
1134 if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
1135 if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
1136
1137 pickup tiny.nib;
1138
1139 pos1(left_curve, 180);
1140 pos2(vair, 270);
1141 pos3(right_curve, 0);
1142
1143 y1 = good.y rbar_height;
1144 bot y2r = -oo;
1145 y0l = top y1;
1146 lft x1r = hround max(0.5u, 1.25u-0.5left_curve);
1147 rt x3r = hround min(w-0.5u, w-u+0.5right_curve);
1148 x2 = 0.5w-0.25u;
1149
1150 {{
1151 interim superness := more_super;
1152 filldraw stroke super_arc.e(1, 2);
1153 }};
1154
1155 y3 = 0.5 [y2, y4];
1156 top y4r = x_height + vround 1.5oo;
1157 x4 = x2 + 0.25u;
1158
1159 pos4(vair', 90);
1160 pos5(hair, 180);
1161
1162 y5 = min(good.y(0.5[rbar_height, x_height]+0.9), y4l-vair);
1163
1164 x5r = x1r;
1165 (x, y4l) = whathever[z4r, z5];
1166 x4l := min(x, x4l+0.5u);
1167
1168 filldraw stroke pulled_arc.e(2, 3) & pulled_arc.e(3, 4)
1169 ... {x5-x4, 5(y5-y4)}z5e;
1170
1171 path testpath;
1172
1173 testpath = super_arc.r(2, 3) & super_arc.r(3, 4);
1174
1175 y1'r = y0r = y0l - 0.6[thin_join, vair];
1176 y1'l = y0l;
1177 x1'l = x1'r = x1;
1178
1179 forsuffixes $ = l, r:
1180 x0$ = xpart(((w, y0$)--(x1, y0$)) intersectionpoint testpath);
1181 endfor;
1182
1183 fill stroke z0e--z1'e;
1184
1185 path pth;
1186 numeric tp, theta;
1187
1188 theta = 25;
1189
1190 pos6(stem, theta-90);
1191 pos7(hair, 90+theta);
1192
1193 top y6l = asc_height;
1194
1195 pth = super_arc.r(3, 4) ... {x5-x4, 5(y5-y4)}z5;
1196
1197 z7 = directionpoint dir(180+theta) of pth;
1198 x6 = x7;
1199
1200 filldraw stroke z7e{dir(theta)}..{dir(180+theta)}z6e;
1201
1202 penlabels(0, 1, 2, 3, 4, 5, 6, 7);
1203
1204 endchar;
1205
1206 % Reverse solidus -- in contrast the the cm backslash
1207 % this is stressed, an oblique slab of the width of
1208 % capital stems. The dimensions also are those of
1209 % capitals, whearas the cm backslash has the dimensions
1210 % of delimiters.
1211
1212 cmchar "Reverse solidus";
1213 beginchar(oct "113", 9u#, cap_height#, 0);
1214 adjust_fit(0, 0);
1215
1216 pickup fine.nib;
1217
1218 pos1(cap_stem, 0);
1219 pos2(cap_stem, 0);
1220
1221 lft x1l = u;
1222 rt x2r = w - u;
1223 top y1 = cap_height;
1224 bot y2 = 0;
1225
1226 filldraw stroke z1e--z2e;
1227
1228 penlabels(1, 2);
1229
1230 endchar;
1231
1232 % the left-angle, a funny looking thing, made from a single
1233 % stroke of an eliptic pen. The upstroke is bowed inward,
1234 % barely perceptibly
1235
1236 cmchar "Left-angle";
1237 beginchar(oct "150", 11u#, cap_height#, 0);
1238 adjust_fit(0, 0);
1239
1240 numeric theta, bow, elbow;
1241
1242 elbow := x_height + 0.5*(cap_height-x_height);
1243
1244 x1 = x3 = w - 0.5u - 0.4cap_stem;
1245 y1 = 0; cap_height - y3 = 0.4cap_stem;
1246 y2 = elbow;
1247 x2 = 0.5u + 0.4cap_stem;
1248
1249 theta := angle(z2-z1)-90;
1250 bow := 5;
1251
1252 pickup pencircle xscaled cap_hair yscaled cap_stem rotated theta;
1253 draw z1{dir(theta+90-bow)}...{dir(theta+90+bow)}z2--z3;
1254
1255 penlabels(1, 2, 3);
1256
1257 endchar;
1258
1259 cmchar "Variant Infinity";
1260 beginchar("infty", 18u#, x_height#, 0);
1261 adjust_fit(0, 0);
1262
1263 numeric theta, psi;
1264 theta = 70;
1265 psi = 40;
1266
1267 penrad = hair;
1268
1269 y1 = y3 = y4 = y6 = 7/16x_height;
1270 x1 = w - x6 = 0.5u + penrad;
1271 2x3 = 2x4 = x1 + x6;
1272 2x2 = x1 + x3;
1273 2x5 = x4 + x6;
1274 y2 = y5 = penrad - oo;
1275
1276 pickup pencircle scaled 2penrad;
1277
1278 draw z1{dir(-theta)}...z2...{dir(theta)}z3;
1279 draw z4{dir(-theta)}...z5...{dir(theta)}z6;
1280
1281 penlabels(1, 2, 3, 4, 5, 6);
1282
1283 % this is the overbar
1284
1285 pickup fine.nib;
1286
1287 pos7(hair, 90+psi);
1288 pos8(2penrad, 90);
1289 pos9(hair, 90-psi);
1290
1291 x7 = w - x9 = 0.32[x1, x2];
1292 y7 = y9 = 11/16x_height;
1293 2x8 = x7 + x9;
1294 top y8r = o + h;
1295
1296 filldraw stroke z7e{dir psi}...z8e...{dir -psi}z9e;
1297
1298 penlabels(7, 8, 9);
1299
1300 endchar;
1301
1302 % This is series of small cups, caps and bars. Although
1303 % most of these are binary operators, Pohle sets these
1304 % much tighter than the other operators in the text, but
1305 % not quite as tight as ordinary terms.
1306 % We simulate this behaviour by declaring them \mathord
1307 % in the style file (rather than \mathbin), but add a liile
1308 % extra spacing around them with cupcap_fit
1309
1310 def cupcap_fit = adjust_fit(24/36pt#, 24/36pt#) enddef;
1311
1312 cmchar "upwards opened bracket";
1313 beginchar(oct "114", 14u#, x_height#, 0);
1314 cupcap_fit;
1315
1316 pickup rule.nib;
1317
1318 lft x1 = hround(u - eps);
1319 x2 = w - x1;
1320 bot y1 = bot y2 = 0;
1321
1322 x3 = x1;
1323 x4 = x2;
1324
1325 y3 = y4 = 1/3x_height;
1326
1327 draw z3--z1--z2--z4;
1328
1329 labels(1, 2, 3);
1330
1331 endchar;
1332
1333 cmchar "Small bar acute";
1334 beginchar(oct "115", 10u#, x_height#, 0);
1335 cupcap_fit;
1336
1337 pickup rule.nib;
1338
1339 lft x1 = hround(u - eps);
1340 x2 = w - x1;
1341 bot y1 = bot y2 = 0;
1342
1343 draw z1--z2;
1344
1345 labels(1, 2);
1346
1347 pickup crisp.nib;
1348
1349 x4 + 0.5stem = hround(2/3w);
1350 x5 = 2/3[x4, w-x4];
1351 y4 + 0.5stem = x_height + oo;
1352 y5 = 1/2x_height;
1353
1354 numeric theta;
1355 theta = angle(z5-z4) + 90;
1356 pos4(stem, theta);
1357 pos5(hair, theta);
1358
1359 filldraw circ_stroke z4e--z5e;
1360
1361 penlabels(4, 5);
1362
1363 endchar;
1364
1365 cmchar "Small cup";
1366 beginchar(oct "116", 10u#, x_height#, 0);
1367 cupcap_fit;
1368
1369 pickup rule.nib;
1370
1371 lft x1 = hround(u - eps);
1372 x2 = w - x1;
1373 y1 = y2 = 0.5x_height;
1374 x3 = good.x 0.5w;
1375 bot y3 = -oo;
1376
1377 draw z1..z3..z2;
1378
1379 labels(1, 2, 3);
1380
1381 endchar;
1382
1383 cmchar "Small bar over cap";
1384 beginchar(oct "117", 10u#, x_height#, 0);
1385 cupcap_fit;
1386
1387 pickup rule.nib;
1388
1389 lft x1 = hround(u - eps);
1390 x2 = w - x1;
1391 y1 = y2 = 1/3x_height;
1392 x3 = good.x 0.5w;
1393 y3 = 2/3x_height;
1394
1395 draw z1..z3..z2;
1396
1397 labels(1, 2, 3);
1398
1399 x4 = x1;
1400 x5 = x2;
1401
1402 top y4 = top y5 = x_height;
1403
1404 draw z4--z5;
1405
1406 labels(4, 5);
1407
1408 endchar;
1409
1410 cmchar "Small cup over bar";
1411 beginchar(oct "120", 10u#, x_height#, 0);
1412 cupcap_fit;
1413
1414 pickup rule.nib;
1415
1416 lft x1 = hround(u - eps);
1417 x2 = w - x1;
1418 top y1 = top y2 = x_height + oo;
1419 x3 = good.x 0.5w;
1420 y3 = 2/3x_height;
1421
1422 draw z1..z3..z2;
1423
1424 labels(1, 2, 3);
1425
1426 x4 = x1;
1427 x5 = x2;
1428
1429 y4 = y5 = 1/3x_height;
1430
1431 draw z4--z5;
1432
1433 labels(4, 5);
1434
1435 endchar;
1436
1437 cmchar "Small cap over bar";
1438 beginchar(oct "121", 10u#, x_height#, 0);
1439 cupcap_fit;
1440
1441 pickup rule.nib;
1442
1443 lft x1 = hround(u - eps);
1444 x2 = w - x1;
1445 y1 = y2 = 2/3x_height;
1446 x3 = good.x 0.5w;
1447 top y3 = x_height + oo;
1448
1449 draw z1..z3..z2;
1450
1451 labels(1, 2, 3);
1452
1453 x4 = x1;
1454 x5 = x2;
1455
1456 y4 = y5 = 1/3x_height;
1457
1458 draw z4--z5;
1459
1460 labels(4, 5);
1461
1462 endchar;
1463
1464 cmchar "Small cup with acute";
1465 beginchar(oct "122", 10u#, x_height#, 0);
1466 cupcap_fit;
1467
1468 pickup rule.nib;
1469
1470 lft x1 = hround(u - eps);
1471 x2 = w - x1;
1472 y1 = y2 = 1/3x_height;
1473 x3 = good.x 0.5w;
1474 bot y3 = -oo;
1475
1476 draw z1..z3..z2;
1477
1478 labels(1, 2, 3);
1479
1480 pickup crisp.nib;
1481
1482 x4 + 0.5stem = hround(2/3w);
1483 x5 = 2/3[x4, w-x4];
1484 y4 + 0.5stem = x_height + oo;
1485 y5 = 1/2x_height;
1486
1487 numeric theta;
1488 theta = angle(z5-z4) + 90;
1489 pos4(stem, theta);
1490 pos5(hair, theta);
1491
1492 filldraw circ_stroke z4e--z5e;
1493
1494 penlabels(4, 5);
1495
1496 endchar;
1497
1498 cmchar "Small raised cap";
1499 beginchar(oct "123", 10u#, x_height#, 0);
1500 cupcap_fit;
1501
1502 pickup rule.nib;
1503
1504 lft x1 = hround(u - eps);
1505 x2 = w - x1;
1506 y1 = y2 = 0.5x_height;
1507 x3 = good.x 0.5w;
1508 top y3 = x_height + oo;
1509
1510 draw z1..z3..z2;
1511
1512 labels(1, 2, 3);
1513
1514 endchar;
1515
1516 end