summaryrefslogtreecommitdiff
path: root/fonts/mbboard/source/mbbromup.mf
blob: b982ae6c83cffdedf69c54a423f9a3585ab7c220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
% blackboard typefaces by Anthony Phan.
% file: mbbromup.mf (Roman uppercase)
% last modification: 25.10.2001.

def horizontal_rules_list=0.4h,0.5h,0.6h,
  -body_depth,-desc_depth,cap_height,asc_height,body_height
enddef;

use_rule2;

beginchar("A",11.5u#+2appr#,cap_height#,0);
  "The letter A";
% no italic correction
  complete_AV(1,apprl-0.5u,w-apprr+0.5u);
  pickup circle.nib;
  z11=whatever[z1,z2];
  z12=whatever[z5,z6];
  bot y11=bot y12=vround 0.25h;
  draw z11..z12;
  labels(11,12);
  math_fit(0,0);
endchar;

beginchar("B",10.15u#+Appr#+appr#,cap_height#,0);
  "The letter B";
  italcorr 0.8cap_height#*slant-0.85u#;
  pickup circle.nib; bot y4=vround 0.5h;
  lft x1=lft x9=Apprl; x2=x4=0.56[x1,x3];
  rt x3=w-apprr-hround 0.35u;
  x6=x8=0.56[x1,x7]; rt x7=w-apprr; x5=x10=x11=x1+hthick;
  top y1=top y2=top y11=h; y4=y5=y6; y3=0.5[y2,y4];
  y7=0.5[y6,y8]; bot y8=bot y9=bot y10=0;
  x12=max(x7-hThick,x6); x14=min(x12,x3);
  tmp_path:=z1..z2 right_to_down z3 down_to_left z4..z5
  &z5..z6 right_to_down z7 down_to_left z8..z9;
  draw tmp_path; draw z10..z11;
  bbbowl(z6,z7,z8,hThick) tmp_path;
  bbbowl(z2,z3,z4,max(0,x3-x.bowl.mid)) tmp_path;
  pickup square.nib; draw z1..z9;
  labels(1,2,3,4,5,6,7,8,9,10,11);
  math_fit(0,0.3cap_height#*slant);
endchar;

beginchar("C",11u#+2appr#,cap_height#,0);
  "The letter C";
  italcorr 0.8cap_height#*slant-0.5u#;
  pickup circle.nib;
  top y2=h+o; bot y4=-o; lft x3=apprl;
  rt x1=w-apprr; x5-x1=hround 0.265u;
  y1=0.223[y2,y4]; y5=0.223[y4,y2]; y3=0.5[y4,y2];
  tmp_path:=reverse elliptic_arc(3,2,1)
  & elliptic_arc(3,4,5);
   draw tmp_path;
  bbbowl(z2,z3,z4,hThick) tmp_path;
  square_end1(z1-z1');
  square_end5(z5-z5');
  labels(1,1',2,3,4,5,5');
  math_fit(-0.4cap_height#*slant,0.3cap_height#*slant);
endchar;

beginchar("D",11.25u#+Appr#+appr#,cap_height#,0);
  "The letter D";
  italcorr 0.6cap_height#*slant-0.5u#;
  pickup circle.nib;
  lft x1=lft x5=Apprl; rt x3=w-apprr;
  x2=0.5[x1,x3]; x4=0.525[x1,x3]; x6=x7=x1+hthick;
  top y1=top y2=top y7=h; bot y4=bot y5=bot y6=0; y3=h/2;
  tmp_path:=z1..z2 right_to_down z3 down_to_left z4..z5;
  draw tmp_path; draw z6..z7;
  bbbowl(z2,z3,z4,hThick) tmp_path;
  pickup square.nib; draw z1..z5;
  labels(1,2,3,4,5,6,7);
  math_fit(0,0.5cap_height#*slant);
endchar;

beginchar("E",7.5u#+Appr#+appr#,cap_height#,0);
  "The letter E";
  italcorr cap_height#*slant-0.5u#;
  pickup circle.nib; rt x1=rt x4=w-apprr; lft x2=lft x3=Apprl;
  x5=x6=x3+hthick; lft x7=x5; rt x8=w-apprr-hround 0.7u;
  top y1=top y2=top y6=h; bot y3=bot y4=bot y5=0;
  bot y7=bot y8=vround(0.5h); pickup square.nib;
  draw z1--z2--z3--z4; draw z5..z6; draw z7..z8;
  labels(1,2,3,4,5,6,7,8);
  math_fit(0,max(0.5cap_height#*slant-0.7u#,0));
endchar;

beginchar("F",7.5u#+Appr#+appr#,cap_height#,0);
  "The letter F";
  italcorr cap_height#*slant-0.5u#;
  pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=Apprl;
  x4=x5=x3+hthick; lft x6=x4; rt x7=w-apprr-hround 0.7u;
  top y1=top y2=top y5=h; bot y3=bot y4=0;
  y6=y7=good.y 0.5h; pickup square.nib;
  draw z1--z2--z3--z4--z5; draw z6..z7;
  labels(1,2,3,4,5,6,7);
  math_fit(0,max(0.5cap_height#*slant-0.7u#,0));
endchar;

% The openness of the letter G depends on the width.

beginchar("G",11.5u#+0.5thin#+2appr#,cap_height#,0);
  "The letter G";
  italcorr 0.8cap_height#*slant-0.5u#;
  numeric t[];
  pickup circle.nib;
  top y2=h+o; bot y4=-o; y1=y3=0.5[y2,y4];
  rt x1=apprl+13u; lft x3=apprl; x2=x4=0.5[x3,x1];
  tmp_path:=superellipse(z1,z2,z3,z4,superness);
  rt x5=w-apprr;
  t1=xpart(tmp_path intersectiontimes ((x5,y1)..(x5,y2)));
  t2=xpart(tmp_path intersectiontimes ((x5,y1)..(x5,y4)));
  z5=point t1 of tmp_path; z6=point t2 of tmp_path;
  top z7=(x6,vround(h/2)); y8=y9=y7; 
  lft x8=apprl+6u;
  cutdraw subpath (t1,t2) of tmp_path;
  draw z6..z7;
  bbbowl(z2,z3,z4,hThick) tmp_path;
  hbbowl(z4,z7,z7,hthick) tmp_path;
  pickup square.nib; draw z7..z8;
  penlabels(1,2,3,4,5,6,7,8);
  math_fit(-0.4cap_height#*slant,0.5cap_height#*slant);
endchar;

beginchar("H",11u#+2Appr#,cap_height#,0);
  "The letter H";
  italcorr cap_height#*slant-u#;
  pickup circle.nib;  
  lft x1=lft x3=Apprl; rt x5=rt x7=w-Apprr;
  x7-x8=x5-x6=x4-x3=x2-x1=hthick;
  bot y1=0; top y3=h; y1=y2=y5=y6; y3=y4=y7=y8;
  bot y9=bot y10=vround 0.5h; lft x9=x2; rt x10=x6;
  draw z9..z10; pickup square.nib; draw z1--z2--z4--z3--cycle;
  draw z5--z6--z8--z7--cycle; labels(1,2,3,4,5,6,7,8,9,10);
  math_fit(0,0.5ic#);
endchar;

beginchar("I",hthick#+thin#+2Appr#,cap_height#,0);
  "The letter I";
  italcorr cap_height#*slant-u#;
  center_bar(1,2); x1=x3; x2=x4;
  bot y1=bot y2=0; top y3=top y4=h; pickup square.nib;
  draw z1--z2--z4--z3--cycle; labels(1,2,3,4);
  math_fit(0,0.5ic#);
endchar;

beginchar("J",7.25u#+Appr#+appr#,cap_height#,0);
  "The letter J";
  italcorr cap_height#*slant-u#;
  pickup circle.nib;
  lft x1=apprl; rt x3=rt x4=w-Apprr; x2=0.5[x1,x3];
  top y1=vround(0.3h); bot y2=-o; y3=y1; top y4=h;
  tmp_path:=z1 down_to_right z2 right_to_up z3..z4;
  draw tmp_path;
  hbbowl(z2,z3,z4,hThick) tmp_path;
  pickup square.nib; draw z4..z.bowl.bot;
  square_end1(up);
  labels(1,2,3,4);
  math_fit(0,0.5ic#);
endchar;

beginchar("K",11.5u#+Appr#+appr#,cap_height#,0);
  "The letter K";
  italcorr cap_height#*slant-0.5u#;
  pickup circle.nib;
  lft x1=lft x3=Apprl; x2-x1=hthick; x4=x5=x2;
  bot y1=0; y2=y1; top y3=h; y4=y3;
  x6r=w-apprr; y6r=h; y5=0.4h;
  adjust_slanted_bar(5,6r,5a,6)(0.5thin,-1);
  z6-z6l=z6r-z6; ortho_penpos5(thin,z6-z5);
  z7=(w-apprr,0); top z8b=(0.78[x3,x4],h);
  adjust_slanted_bar(8b,7,7b,8)(thick,1);
  z9=whatever[z5,z6]; z9=whatever[z7,z7b];
  z10=whatever[z5,z6]; z10=whatever[z8,z8b];
  y7a-y7=y8a-y8=thin; z7a=whatever[z7,z7b]; z8a=whatever[z8,z8b];
  penpos7(diag_width(thin,z7b-z7),0);
  penpos8(diag_width(thin,z8b-z8),0);
  ortho_penpos9(thin, z7b-z7); ortho_penpos10(thin, z8b-z8);
  pickup square.nib; draw z1--z2--z4--z3--cycle;
  penstroke z5e..z6e; penstroke z7e..z9e; penstroke z8e..z10e;
  fill z7--z8--z8a--z7a--cycle;
  labels(1,2,3,4,5a,7a,7b,8a,8b); penlabels(5,6,7,8,9,10);
  math_fit(0,0);
endchar;

beginchar("L",7.5u#+Appr#+appr#,cap_height#,0); "The letter L";
  % no italic correction
  pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=Apprl;
  x4=x5=x3+hthick; bot y1=bot y2=bot y5=0; top y3=top y4=h;
  pickup square.nib; draw z1--z2--z3--z4--z5;
  labels(1,2,3,4,5);
  math_fit(0,0);
endchar;

beginchar("M",14u#+2Appr#,cap_height#,0);
  "The letter M";
  italcorr cap_height#*slant-u#;
  pickup circle.nib;
  bot y1=0; y1=y6=y7=y11=y12; top y2=h; y2=y3=y9=y10;
  lft x1=lft x2=Apprl; rt x10=rt x11=w-Apprr;
  x10-x9=x11-x12=x7-x6=x3-x2=hthick; x6-x1=x12-x7;
  y6r=y7r=0; y2l=y3l=y8l=h;
  y2l-y2r=y3l-y3r=y6l-y6r=y7l-y7r=thin;
  x2l=x2r=x2; x8l=lft x9;
  adjust_slanted_bar(6,3,4',5')(thick,-1);
  adjust_slanted_bar(7,8l,7',8')(0.5thin,1);
  if x4'>x7:
    z4=whatever[z3,z4']; z4=whatever[z7,z8']; 
    z5=whatever[z1,z2]; z5=whatever[z6,z5'];
  else: z4=z4'; z5=z5'; fi
  ortho_penpos4(thin,z4'-z3);
  ortho_penpos5(thin,z6-z5');
  ortho_penpos8(thin,z8'-z7);
  forsuffixes $=r,l:
    z3$-z4$=whatever*(z3-z4);
    z7$-z8$=whatever*(z7-z8);
    z6$-z5$=whatever*(z6-z5);
  endfor;
  penstroke z2e--z3e--z4e; penstroke z5e--z6e--z7e--z8e;
  pickup square.nib; draw z1..z2; draw z9--z10--z11--z12--cycle;
  penlabels(2,3,4,5,6,7,8); labels(1,4',5',7'8',9,10,11,12);
  math_fit(0,0.5ic#);
endchar;

beginchar("N",10.7u#+2Appr#,cap_height#,0);
  "The letter N";
  italcorr cap_height#*slant-u#;
  pickup circle.nib;
  bot y1=0; y1=y6=y7; top y2=h; y2=y3=y5;
  lft x1=lft x2=Apprl; rt x5=rt x6=w-Apprr;
  x3-x2=x6-x7=hthick; penpos2(thin,-90); penpos6(thin,90);
  y3l=h; y7l=0; y3l-y3r=y7r-y7l=thin;
  adjust_slanted_bar(3,7,8a,4a)(thick,-1);
  if x8a>x2: z8=z8a; else: x8=x2; z8=whatever[z7,z8a]; fi
  if x4a<x6: z4=z4a; else: x4=x6; z4=whatever[z3,z4a]; fi
  ortho_penpos4(thin,z4-z3); ortho_penpos8(thin,z8-z7);
  z8r-z7r=whatever*(z8-z7); z8l-z7l=whatever*(z8-z7);
  z4r-z3r=whatever*(z4-z3); z4l-z3l=whatever*(z4-z3);
  penstroke z2e--z3e--z4e; penstroke z6e--z7e--z8e;
  pickup square.nib; draw z1..z2; draw z5..z6;
  labels(1,5,4a,8a); penlabels(2,3,4,6,7,8);
  math_fit(0,0.5ic#);
endchar;

beginchar("O",13u#+2appr#,cap_height#,0);
  "the letter O";
  italcorr 0.6cap_height#*slant-0.5u#;
  pickup circle.nib;
  bbcircle1(apprl,w-apprr,h+o,-o);
  draw last_path;
  bbbowl(z1b,z1a,z1d,hThick) last_path;
  bbbowl(z1b,z1c,z1d,hThick) last_path;
  math_fit(-0.4cap_height#*slant,ic#);
endchar;

beginchar("P",10.15u#+Appr#+appr#,cap_height#,0);
  "The letter P";
  italcorr 0.75cap_height#*slant-0.5u#;
  pickup circle.nib;
  lft x1=lft x3=Apprl; rt x6=w-apprr; x2-x1=x4-x3=hthick;
  x5=0.50[x1,x6]; x7=0.50[x1,x6]; x8=x2;
  bot y1=bot y2=0; top y3=top y4=top y5=h;
  bot y7=bot y8=vround 0.4h; y6=0.5[y5,y7];
  tmp_path:=z3..z5 right_to_down z6 down_to_left z7..z8;
  draw tmp_path;
  bbbowl(z5,z6,z7,hThick) tmp_path;
  pickup square.nib; draw z4--z2--z1--z3;
  labels(1,2,3,4,5,6,7,8);
  math_fit(0,0.4cap_height#*slant-u#);
endchar;

beginchar("Q",13u#+2appr#,cap_height#,0);
  "the letter Q";
  italcorr 0.6cap_height#*slant-0.5u#;
  pickup circle.nib;
  bbcircle1(apprl,w-apprr,h+o,-o);
  draw last_path;
  bbbowl(z1b,z1a,z1d,hThick) last_path;
  bbbowl(z1b,z1c,z1d,hThick) last_path;
  a:=75; x1e=x1c+hThick;
  x2=0.60[x1d,x1e];
  z2=last_path intersectionpoint ((x2,y1d)..(x2,y1a)); 
  x3=0.00[x1d,x1e]; y3=good.y 0.18[y1d,y1b];
  y5l=y6l=-o; rt x6=w-apprr-hround 0.5u;
  x6-x5=0.5thin/sind(angle(dir a slanted slant));
  penpos6(whatever,a); y6r=y5r;
  ortho_penpos5(thin,right);
  z4=0.5[z3,z5];
  penstroke z5e..z6e;
  draw z2{(z3-z2) xscaled 1/16}...z3{right}...
  z4{(z4-z3) xscaled 1/2}...z5{right};
  labels(2,3,4); penlabels(5,6);
  math_fit(-0.4cap_height#*slant,ic#);
endchar;

beginchar("R",10.15u#+Appr#+appr#,cap_height#,0);
  "The letter R";
  italcorr 0.75cap_height#*slant-0.5u#;
  pickup circle.nib;
  lft x1=lft x3=Apprl; rt x6=w-apprr; x2-x1=x4-x3=hthick;
  x9=x6-hThick; x5=0.55[x1,x6]; x7=0.50[x1,x6]; x8=x2;
  bot y1=bot y2=0; top y3=top y4=top y5=h;
  bot y7=bot y8=vround 0.4h; y6=0.5[y5,y7];
  tmp_path:=z3..z5 flat_right_to_down z6 down_to_left z7..z8;
  draw tmp_path;
  bbbowl(z5,z6,z7,hThick) tmp_path;
  pickup square.nib;
  draw z4--z2--z1--z3;
  z9=z.bowl.bot;
  z0'=(w-apprr+0.375u,0);
  adjust_slanted_bar(9,0',0'',10)(0.5thin,1);
  a:=diag_width(1,z9-z10);
  z11=z10-(thick*a,0);
  y0=y8; z0-z11=whatever*(z9-z10);
  if x0>x2: z12=tmp_path intersectionpoint (z11..(z11+z9-z10));
  else: x12=x2; z12-z11=whatever*(z9-z10); fi
  y10a=y11a=thin; z10a=whatever[z10,z9]; z11a=whatever[z11,z12];
  penpos10(thin*a,0); penpos11(thin*a,0);
  ortho_penpos9(thin,z9-z10); ortho_penpos12(thin,z12-z11);
  penstroke z9e..z10e; penstroke z11e..z12e;
  fill z11--z10--z10a--z11a--cycle;
  labels(1,2,3,4,5,6,7,8,9,10,0,0',0'',10a,11a);
  penlabels(9,10,11,12);
  math_fit(0,0);
endchar;

beginchar("S",10.7u#+2appr#,cap_height#,0);
  "The letter S";
  italcorr 0.8cap_height#*slant-1.1u#;
  pickup circle.nib;
  slope:=-h/73u; y5=0.52[y8,y2]; top y2=h+o; bot y8=-o;
  y2-y1=vround 0.125h; y9-y8=vround 0.175h;
  lft x3l=lft x9+0.05u=apprl;
  rt x7r=w-apprr; x7r-x1=0.95u;
  x5=x8=0.5[x3l,x7r]; x2=0.5[x5,0.5[x1,x3l]];
  x3r-x3l=x7r-x7l=hround 0.5[thin,cap_ess];
  ortho_penpos5(cap_ess,(-1,-slope));
  forsuffixes $=r,l:
    ellipse_set(2,3.$,4.$,5.$); ellipse_set(8,7.$,6.$,5.$);
  endfor
  z1'-z1=(z2-z1)xscaled 1/3; z9-z9'=(z9-z8)xscaled 1/4;
  draw z1{z1'-z1}...z2 left_to_down z3l...z4l
  ---z6l...z7l down_to_left z8;
  draw z2 left_to_down z3r...z4r
  ---z6r...z7r down_to_left z8...{z9-z9'}z9;
  square_end1(z1-z1'); square_end9(z9-z9');
  labels(1,1',2,8,9,9'); penlabels(3,4,5,6,7);
  math_fit(-0.2cap_height#*slant,0.3cap_height#*slant);
endchar;

beginchar("T",10.2u#+2appr#,cap_height#,0); "The letter T";
  italcorr cap_height#*slant;
  center_bar(1,2); bot y1=bot y2=0; top y5=top y6=h;
  lft x5=apprl-hround 0.5u; rt x6=w-apprr+hround 0.5u;
  z3=(x1,y5); z4=(x2,y5); pickup square.nib;
  draw z5..z6; draw z3--z1--z2--z4; labels(1,2,3,4,5,6);
  math_fit(-0.5cap_height#*slant,
    cap_height#*slant-2.5u#);
endchar;

beginchar("U",11u#+2Appr#,cap_height#,0);
  "The letter U";
  italcorr cap_height#*slant-u#;
  pickup circle.nib;  
  rt x1=rt x2=w-Apprr; lft x4=lft x5=Apprl; x3=0.5[x2,x4];
  top y1=top y5=h; bot y3=-o; y2=y4=1/3[y3,y1]; 
  tmp_path:=z1..z2 down_to_left z3 left_to_up z4..z5;
  draw tmp_path;
  hbbowl(z3,z4,z5,hthick) tmp_path;
  pickup square.nib; draw z5..z.bowl.bot;
  square_end1(up);
  labels(1,2,3,4,5);
  math_fit(-0.4cap_height#*slant,0.5ic#);
endchar;

beginchar("V",11.5u#+2appr#,cap_height#,0);
  "The letter V";
  italcorr cap_height#*slant;
  complete_AV(-1,apprl-0.5u,w-apprr+0.5u);
  math_fit(-0.5cap_height#*slant,cap_height#*slant-2u#);
endchar;

beginchar("W",16u#+2appr#,cap_height#,0);
  "The letter W";
  italcorr cap_height#*slant;
  pickup circle.nib; 
  x1=apprl; x12=w-apprr; x6=x7=0.5[x1,x12];
  x5-x2=hthick; x2-x1=x7-x5=x8-x7=x12-x11;
  y1=y3=y6=y7=y9=y12=h; y2=y5=y8=y11=bot y4a=0;
  a:=diag_width(1,z1-z2);
  penpos1(thin*a,0); penpos2(thin*a,0); penpos3(thin*a,0);
  penpos8(thin*a,0); penpos9(thin*a,0);
  x3-x1=x9-x7=thick*a;
  z4a-z3=z10a-z9=whatever*(z2-z1);
  z4=whatever[z3,z4a]; z10=whatever[z9,z10a];
  if x4a>x5: z4=whatever[z5,z6]; z10=whatever[z11,z12];
  else: bot y4=bot y10=0; fi
  ortho_penpos4(thin,z3-z4a); ortho_penpos10(thin,z9-z10a);
  a:=diag_width(thin,z6-z5);
  penpos5(a,0); penpos11(a,0); penpos12(a,0);
  z6-z6l=z5-z5l; z7r-z7=z8r-z8;
  z6r=whatever[z7,z8]; z6r-z5r=whatever*(z6-z5);
  z7l=whatever[z5,z6]; z7l-z8l=whatever*(z7-z8);
  y1-y1a=thin; z1a=whatever[z1,z2];
  z1-z1a=z2a-z2=z3-z3a=z7-z7a=z8a-z8=z9-z9a;
  y5a-y5=thin; z5a=whatever[z5,z6];
  z5a-z5=z11a-z11;
  penstroke z1e..z2e; penstroke z3e..z4e;
  penstroke z9e..z10e; penstroke z11e..z12e;
  fill z5r--z5l--z6l--z6--z6r--cycle;
  fill z8r--z8l--z7l--z7--z7r--cycle;
  fill z1--z3--z3a--z1a--cycle; fill z2--z5--z5a--z2a--cycle;
  fill z7--z9--z9a--z7a--cycle; fill z8--z11--z11a--z8a--cycle;
  penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
  labels(1a,2a,3a,4a,5a,8a,9a,10a,11a);
  math_fit(-0.5cap_height#*slant,cap_height#*slant-1.5u#);%
endchar;

beginchar("X",12u#+2appr#,cap_height#,0); "The letter X";
  italcorr cap_height#*slant-0.5u#;
  complete_X(0.375u);
  math_fit(0,0);
endchar;

% a modifier
beginchar("Y",12u#+2appr#,cap_height#,0); "The letter Y";
  italcorr cap_height#*slant-0.5u#;
  center_bar(3,4); bot y3=bot y4=-d;
  x3l=apprl+hround(0.5(w-apprr-apprl-hthick-thin*(1++slant)));
  x4l-x3l=hround(hthick+thin*(1++slant));
  x3r-x3l=x4l-x4r=thin*(1++slant);
  y4l=y3l=-d; y3r-y3l=y4r-y4l=thin;
  y1=y6=y7r=h; x1=apprl; x7r=w-apprr;
  x2=x3; y2=y5a=0.4h; x6-x1=x5a-x2=diag_width(thick,z1-z2);
  a:=diag_width(thin,z1-z2);
  penpos1(a,0); penpos6(a,180); z8=z5;
  forsuffixes $=,r,l: x5$=x4$; z5$-z6$=whatever*(z2-z1); endfor
  forsuffixes $=r,l: x2$=x3$; z2$-z1$=whatever*(z2-z1); endfor
  y1-y1a=y6-y6a=thin; z1a=whatever[z1,z2]; z6a=whatever[z6,z5a];
  adjust_slanted_bar(7r,8,7,8a)(0.5thin,-1); z7-z7l=z7r-z7;
  ortho_penpos8(thin,z7-z8);
  penstroke z1e--z2e--z3e--z4e--z5e--z6e;
  fill z1--z6--z6a--z1a--cycle; penstroke z7e..z8e;
  penlabels(1,2,3,4,5,6,7,8,9,10); labels(1a,5a,6a,8a);
  math_fit(-0.5cap_height#*slant,cap_height#*slant-3u#);
endchar;

beginchar("Z",10.15u#+2appr#,cap_height#,0); "The letter Z";
  italcorr cap_height#*slant-0.5u#;
  pickup circle.nib;
  z1l=(apprl-hround 0.2u,0);
  z2l=(w-apprr+hround 0.2u,0);
  z3r=(apprl+hround 0.2u,h);
  z4r=(w-apprr,h);
  penpos1(thin,90); penpos2(thin,90);
  penpos3(thin,90); penpos4(thin,90);
  z5l=z1r; z8r=z4l;
  adjust_slanted_bar(5l,8r,6r,7l)(thick+thin,-1);
  a:=diag_width(thin,z8r-z6r);
  penpos5(a,0); penpos6(a,0); penpos7(a,0); penpos8(a,0);
  penstroke z1e..z2e; penstroke z3e..z4e;
  penstroke z5e..z7e; penstroke z6e..z8e; 
  penlabels(1,2,3,4,5,6,7,8);
  math_fit(0,0.5cap_height#*slant);
endchar;