summaryrefslogtreecommitdiff
path: root/language/turkish/mf/tkaccl.mf
blob: fb0033e9d28dc1360091539a381472c01870a8f5 (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
% Accented Turkish based on Computer Modern Roman lower case:
% These letters were originally coded by D. E. Knuth in November, 1979,
% inspired by the Monotype faces used in {\sl The Art of Computer Programming}.
% Sans serif designs by Richard Southall were added in April, 1982.
% The programs were revised for the new \MF\ conventions in 1985.

% Accents added by P. A. MacKay in December, 1986.

% Accents are intended to be exact copies of the accents in the
% Computer Modern file accent.mf, with the following exceptions:
%    1.  Bar accents are adjusted to the width of the associated letter.
%    2.  The hat accent is pinched in to fit the letter i.
%    3.  Acute and grave accents are rotated to whatever angle
%        best suits the letter associated letter.
%    4.  The under_h accent is based on an inverted tie accent.

% No attempt is made to put the accent in the same position
% that it would occupy if \TeX\ put it in with the \accent primitive.
% Each accent has been adjusted for vertical and horizontal position
% position to best fit the associated letter.

% Character codes \0033--\0037, \0053, \0074--\0076, \0176 and \0177 
% are generated.
% Character \0040 is generated |iff not monospace|.

if unknown accsub: input accsub fi

cmchar "The letter hatted a";
beginchar(oct "074",9u#,if serifs: if .5(asc_height#-x_height#)>1.5stem#:
		.8[x_height#,asc_height#] else:asc_height# fi
		else:asc_height# fi, 0);
bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh);
italcorr 2/3[x_height#,asc_height#]*slant+.5stem#-serif_fit#-if serifs: 3  fi u#;
adjust_fit(0,serif_fit# if serifs: if hair#+.5stem#>1.5u#:-.25u# fi\\fi);
pickup fine.nib; top y3r=x_height+vround 1.5oo;
if serifs: pos1(flare,180); pos2(hair,180);
 pos3(vair,90);  lft x1r=hround max(u,2.1u-.5flare); x3=.5w-.5u;
 y1=min(bh+.5flare+2vair+2,.9[bh,x_height]-.5flare);
 bulb(3,2,1);  % bulb
else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r;
 pos3(1/8[vair,thin_join],90);
 x3=.5w-.2u; top y1r=vround .82[bh,top y3r];
 filldraw stroke term.e(3,1,left,.9,4); fi  % terminal
pos4(stem,0); rt x4r=hround(w-2.5u+.5stem); y4=1/3[bh,x_height];
pos5(stem,0); x5=x4; y5=max(.55bh,2vair);
filldraw stroke super_arc.e(3,4)&z4e..z5e;  % arc and stem
pos6(.3[thin_join,vair],90); x6=x4; bot y6=bh;
pos7(hround(curve-2stem_corr),180);
lft x7r=hround max(.5u,1.5u-.5curve); y7=1/3[top y8l,top y6r];
pos8(vair,270); x8l=.5w-.75u; bot y8r=-oo;
pos9(thin_join,360); z9l=z5l;
(x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u);
{{interim superness:=more_super;
 filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl
if serifs: numeric shaved_stem; shaved_stem=hround(stem-3stem_corr);
 if hair#+.5stem#>1.5u#: pickup tiny.nib;
  pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
  pos10(shaved_stem,0); x10=x5'; y10=.2[.5tiny,bh];
  pos11(shaved_stem,0); rt x11r=hround(w-.25u); bot y11=0;
  pos12(shaved_stem,0); x11=x12; top y12=slab+eps;
  filldraw z5'l---z10l...z11l{right}--z11r
   --z12r{left}...z10r+.75(z12-z11)---z5'r--cycle;  % foot
 else: pickup crisp.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
  pos10(shaved_stem,0); x10=x5'; y10=1/3bh;
  pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo;
  pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair);
  pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12);
  (x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10);
  filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; fi  % hook
else: numeric shaved_stem; shaved_stem=hround(stem-stem_corr);
 pickup tiny.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
 pos10(shaved_stem,0); x10=x5'; bot y10=0;
 filldraw stroke z5'e--z10e; fi  % base of stem
numeric hat_shift; if h<asc_height:hat_shift=-.2(asc_height-x_height);
 else:hat_shift=0; fi
hat_accent(3,a,hat_shift);
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

cmchar "The letter chim";
beginchar(oct "033",8u#,x_height#,.875desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
 rt x1r=hround(w-.7u); bulb(2,1,0);  % bulb
 pos5(hair,0); rt x5r=hround(w-.5u);
 y5=max(good.y(.5bar_height-.9),y4l+vair');
 (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u);
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull)
  ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e;  % arc and lower terminal
else: pos1(4/7[vair',flare],80);
 rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
 filldraw stroke term.e(2,1,right,.8,4);  % upper terminal
 pos5(.6[vair',flare],275); rt x5r=hround(w-.5u);
 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e;
  if angle direction 1 of p.e>75:
   p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi  % arc and lower terminal
cedilla_accent(4,a,o if serifs: -crisp fi); 
penlabels(0,1,2,3,4,5); endchar;

cmchar "The letter dhal";
beginchar(oct "034",10u#+serif_fit#,asc_height#,.6desc_depth#);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem'); top y1=h;
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
y3=1/8[bar_height,x_height];
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)
 & pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
pickup tiny.nib; bot y2=if serifs:-min(oo,serif_drop) else: 0 fi;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);  % upper serif
 sloped_serif.r(2,0,b,1/3,jut,min(oo,serif_drop)); fi  % lower serif
bar_accent(5,3,c,-8/9desc_depth);
penlabels(0,1,2,3,4,5,6,7); endchar;

% cupped g.  This is fairly straightforward, except for the
% lengthy calculation of cup_shift.  To understand that, you must
% look at the dimension calculations and use of mid_thickness
% in Breve accent in accent.mf.  No change to italic correction,
% because right horn of cup will always fall to left of hook of g.

iff not variant_g: cmchar "The letter cupped g";
beginchar(oct "035",9u#,min(asc_height#,2x_height#),desc_depth#);
italcorr x_height#*slant+.25u#; 
adjust_fit(0,0);
numeric light_vair,light_curve,loop_top,loop_side;
light_vair=Vround(.5[thin_join,vair]+vair_corr);
light_curve=max(fine.breadth,hround(curve-3stem_corr));
loop_top=Vround .77[vair,fudged.stem];
loop_side=hround .64[vair,fudged.stem];
pickup fine.nib; pos1(light_vair,90);
pos2(light_curve,180); pos3(light_vair,270);
pos4(light_curve,360); pos11(loop_top,90);
y11r=good.y(y11r+.15bar_height-y11); x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
lft x2r=hround(1.75u-.5light_curve); rt x4r=hround(w-2.75u+.5light_curve);
top y1r=x_height+oo; y3r=good.y(y3r+.27[top y11r,bot y1l]-y3);
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3);  % left half of bowl
filldraw stroke pulled_arc.e(3,4) & pulled_arc.e(4,1);  % right half of bowl
x0=superness[x1r,x4r]; y0=superness[y4r,y1r];  % NE point on the super bowl
x8'=superness[x3r,x2r]; y8'=superness[y2r,y3r];  % SW point on the super bowl
x8''=superness[x3,x2]; y8''=superness[y2,y3];
pos0(thin_join,angle(z0-z8')+90);
pos8(thin_join,angle(z0-z8')-90); z8=.618[z8',z8''];
if serifs: pos5(vair,90);
 pos6(hair,0); pos7(.5[hair,flare],0); x5=.75[x0,x6]; top y5r=x_height+o;
 rt x6r=hround(w-.25u); y6+(.5[hair,flare])/2=.95[bar_height,x_height]+oo;
 filldraw stroke z0e..{right}z5e; bulb(5,6,7);  % ear
else: pos5(vair',100); top y5r=x_height+oo;
 rt x5l=hround(w-.25u); y5l:=good.y y5l;
 filldraw z0l{z5-z0}..z5l--z5r{left}..{curl 1}z0r--cycle; fi  % ear
pos10(loop_top,90); x10=x8+.75u; y10=y11;
pos12(loop_side,0); pos13(light_vair,-90);
pos14(loop_side,-180); pos10'(.5[thin_join,vair],-270);
rt x12r=hround max(w-1.25u+.5loop_side,w-.5u); y12=y14=.5[y11,y13];
x11=x13=max(.5w,x10+eps); bot y13r=-d-oo-1; x14=w-x12; z10'l=z10l;
filldraw stroke z8e{z8-z0}..z10e---z11e;  % link
filldraw stroke {{interim superness:=hein_super; super_arc.e(11,12)}}
 & super_arc.e(12,13) & super_arc.e(13,14) & super_arc.e(14,10');  % loop
numeric cup_shift; cup_shift= 
  x_height+slab-max(x_height+o+tiny,1/3[x_height,asc_height]+o-vround 1/6[vair,stem]);
if cup_shift>0:cup_shift:=0; fi
cup_accent(1,c,cup_shift);
penlabels(0,1,2,3,4,5,6,7,8,10,11,12,13,14); labels(8',8''); endchar;

iff variant_g: cmchar "Variant cupped g";
beginchar(oct "035",10u#+serif_fit#,.8[x_height#,asc_height#],desc_depth#);
italcorr .8[x_height#,asc_height#]*slant-serif_fit#+.5stem#-2u# if serifs: -.5u# fi;
adjust_fit(0,serif_fit# if serifs: -.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem');
numeric edge; edge=lft x2l;
path edge_path; edge_path=(edge,x_height)--(edge,0);
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=vround 1/3vair;
lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
 &super_arc.e(5,6)&z6e{right}...{up}z7e;  % bowl
y1=ypart(edge_path intersectionpoint(z3l{up}...{left}z4l));
y0=ypart(edge_path intersectionpoint(z7l{down}...{left}z6l));
pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
pickup crisp.nib;
pos8(hround(hair-stem_corr),0); pos7'(stem',0);
z7'=z1; x8r=x7'r; top y8=x_height+oo;
filldraw stroke z7'e--z8e;  % point
if serifs: pickup tiny.nib;
 pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1;
 pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare;
 pos11(flare,-180); z11r=z10r;
 bulb(9,10,11); filldraw stroke super_arc.e(2,9);  % tail
else: pickup fine.nib; pos2'(stem,0); z2'=z2;
 z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0);
 pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1;
 pos10(.5[vair,flare],-90); lft x10=hround 1.25u;
 y10r=good.y -5/6d; y10l:=good.y y10l;
 filldraw stroke z2'e..z2''e&super_arc.e(2'',9)
  & term.e(9,10,left,.9,4); fi  % tail
numeric cup_shift; cup_shift= 
  x_height+slab-max(x_height+o+tiny,1/3[x_height,asc_height]+o-vround 1/6[vair,stem]);
if cup_shift>0:cup_shift:=0; fi
cup_accent(4r,c,cup_shift);
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;

cmchar "The letter kha";
beginchar(oct "036",10u#,asc_height#,.6desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h; bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
if dish>0: under_h_accent(2,4,k);
else: bar_accent(2,4,k,-8/9desc_depth); fi
penlabels(1,2,3,4); endchar;

cmchar "The letter hatted i";
beginchar(oct"075",5u#,if serifs: if .5(asc_height#-x_height#)>1.5stem#:
		.8[x_height#,asc_height#] else:asc_height# fi
		else:asc_height# fi, 0);
italcorr if serifs: asc_height#*slant-serif_fit#+.5stem#-2u#;
         else: asc_height#*slant+.5stem#; fi
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
filldraw stroke z1e--z2e;  % stem
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop);  % upper serif
 dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi  % lower serif
numeric hat_shift; if h<asc_height:hat_shift=-.2(asc_height-x_height);
 else:hat_shift=0; fi
hat_accent(1,d,hat_shift);
penlabels(1,2); endchar;

cmchar "The letter gnaf";
beginchar(oct "037",10u#,if serifs: if .5(asc_height#-x_height#)>1.5stem#:
		.8[x_height#,asc_height#] else:asc_height# fi
		else:asc_height# fi, 0);
italcorr .8[x_height#,asc_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=x_height+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
numeric tilde_shift; if h<asc_height:tilde_shift=-.3(asc_height-x_height);
 else:tilde_shift=0; fi
x5=hround .5w;
tilde_accent(5,t,tilde_shift);
penlabels(1,2,3,4); endchar;

iff not monospace: cmchar "The letter hatted o";
beginchar(oct "040",9u#,if serifs: if .5(asc_height#-x_height#)>1.5stem#:
		.8[x_height#,asc_height#] else:asc_height# fi
		else:asc_height# fi, 0);
italcorr 1/3[x_height#,asc_height#]*slant-.5u# if serifs: - stem# fi;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
penpos1(vair,90); penpos3(vair',-90);
penpos2(curve,180); penpos4(curve,0);
x2r=hround max(.5u,1.25u-.5curve);
x4r=w-x2r; x1=x3=.5w; y1r=x_height+vround 1.5oo; y3r=-oo;
y2=y4=.5x_height-vair_corr; y2l:=y4l:=.52x_height;
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
numeric hat_shift; if h<asc_height:hat_shift=-.2(asc_height-x_height);
 else:hat_shift=0; fi
hat_accent(1,a,hat_shift);
penlabels(1,2,3,4); endchar;

cmchar "The letter shin";
beginchar(oct "053",7.1u#,x_height#,.875desc_depth#);
italcorr x_height#*slant-if serifs:.55u# else:.3u# fi;
adjust_fit(if monospace: .5u#,.4u# else: 0,if serifs:0 else:-.2u# fi fi);
numeric theta; theta=90-angle(40u,h); slope:=-h/40u;  % angle at middle
numeric s_slab; s_slab=if serifs:vair else:Vround .1[vair,stem] fi;
numeric ess'; ess'=max(fine.breadth,ess);
pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-100);
pos0(ess',theta); pos7(s_slab,-90); x2l=x0=x7=.5w;
top y2l=h+vround 1.5oo; bot y7r=-oo;
y0-.5ess'=y7l+if serifs:.54 else: .52 fi\\(y2r-y7l-ess');
lft x3l=hround .6u; rt x6r=hround(w-.6u);
x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine;
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
interim superness:=more_super;
filldraw stroke super_arc.e(2,3) & z3e{down}
 ..z4e---z5e..z6e{down} & super_arc.e(6,7);  % main stroke
if serifs: pos1(hair,180); pos8(hair,180);
 rt x1l=hround(w-1.05u); lft x8r=hround .6u;
 bot y1=min(bot y2r,vround 1/5[top y5r,h]);
 top y8=max(top y7l,vround 5/6 bot y4l);
 filldraw stroke z1e{up}....{left}z2e;  % upper arc
 filldraw stroke z7e{left}....{x8-x7,5(y8-y7)}z8e;  % lower arc
 path upper_arc, lower_arc;
 upper_arc=z1{up}....{left}z2; lower_arc=z7{left}....{x8-x7,5(y8-y7)}z8;
 pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0);
 x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r;
 x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8;
 numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1'));
 filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle;  % upper barb
 t:=xpart(lower_arc intersectiontimes(z9r--z8'));
 filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle;  % lower barb
else: pos1(4/7[s_slab,flare],-100); pos8(flare,-100);
 x1l=good.x(x1l+w-u-rt x1); lft x8r=hround .5u;
 top y1l=vround(.93h+1.5oo); bot y8r=vround .1h-oo;
 filldraw stroke term.e(2,1,right,.9,4);  % upper arc and terminal
 filldraw stroke term.e(7,8,left,1,4); fi  % lower arc and terminal
cedilla_accent(7,c,o if serifs: -crisp fi); 
penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar;

cmchar "The letter tha";
beginchar(oct "0176",7.1u#,x_height#,.6desc_depth#);
italcorr x_height#*slant-if serifs:.55u# else:.3u# fi;
adjust_fit(if monospace: .5u#,.4u# else: 0,if serifs:0 else:-.2u# fi fi);
numeric theta; theta=90-angle(40u,h); slope:=-h/40u;  % angle at middle
numeric s_slab; s_slab=if serifs:vair else:Vround .1[vair,stem] fi;
numeric ess'; ess'=max(fine.breadth,ess);
pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-100);
pos0(ess',theta); pos7(s_slab,-90); x2l=x0=x7=.5w;
top y2l=h+vround 1.5oo; bot y7r=-oo;
y0-.5ess'=y7l+if serifs:.54 else: .52 fi\\(y2r-y7l-ess');
lft x3l=hround .6u; rt x6r=hround(w-.6u);
x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine;
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
interim superness:=more_super;
filldraw stroke super_arc.e(2,3) & z3e{down}
 ..z4e---z5e..z6e{down} & super_arc.e(6,7);  % main stroke
if serifs: pos1(hair,180); pos8(hair,180);
 rt x1l=hround(w-1.05u); lft x8r=hround .6u;
 bot y1=min(bot y2r,vround 1/5[top y5r,h]);
 top y8=max(top y7l,vround 5/6 bot y4l);
 filldraw stroke z1e{up}....{left}z2e;  % upper arc
 filldraw stroke z7e{left}....{x8-x7,5(y8-y7)}z8e;  % lower arc
 path upper_arc, lower_arc;
 upper_arc=z1{up}....{left}z2; lower_arc=z7{left}....{x8-x7,5(y8-y7)}z8;
 pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0);
 x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r;
 x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8;
 numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1'));
 filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle;  % upper barb
 t:=xpart(lower_arc intersectiontimes(z9r--z8'));
 filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle;  % lower barb
else: pos1(4/7[s_slab,flare],-100); pos8(flare,-100);
 x1l=good.x(x1l+w-u-rt x1); lft x8r=hround .5u;
 top y1l=vround(.93h+1.5oo); bot y8r=vround .1h-oo;
 filldraw stroke term.e(2,1,right,.9,4);  % upper arc and terminal
 filldraw stroke term.e(7,8,left,1,4); fi  % lower arc and terminal
x11=1.25u; x12=w-x11;
bar_accent(11,12,a,-8/9desc_depth);
penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10,11,12); endchar;

cmchar "The letter hatted u";
beginchar(oct"076",10u#,if serifs: if .5(asc_height#-x_height#)>1.5stem#:
		.8[x_height#,asc_height#] else:asc_height# fi
		else:asc_height# fi, 0);
italcorr 1/3[x_height#,asc_height#]*slant-.5u# if serifs: - stem# fi;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
if light_vair<fine.breadth: light_vair:=fine.breadth; fi
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos3(stem,0); pos4(stem',0);
lft x1l=hround(2.5u-.5stem); x1=x2; x3=w-x1; x3r=x4r;
if serifs: top y1=x_height+min(oo,serif_drop); bot y4=-min(oo,serif_drop);
else: top y1=x_height; bot y4=0; fi
pos0(stem,0); pos0'(stem',0); x0=x3; x0'=x4; y0=y0';
penpos2'(stem-fine,-180); z2'=z2; y3=y1; y2=.5bar_height;
penpos5(max(eps,light_vair-fine),-90); penpos6(thin_join-fine,0);
y6=y0=2/3bar_height;
filldraw stroke z1e--z2e;  % left stem
filldraw stroke z3e..z0e--z0'e..z4e;  % right stem
pickup fine.nib; bot y5r=-oo; x5l=.5w-.25u; lft x6l=tiny.lft x0l;
(x,y5r)=whatever[z5l,z6l]; x5r:=max(x,.5[x5,x2'r]);
filldraw stroke {{interim superness:=hein_super;
  pulled_arc.e(2',5)}} & z5e{right}...{up}z6e;  % arc
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper left serif
 sloped_serif.l(3,0,b,1/3,jut,serif_drop); % upper right serif
 sloped_serif.r(4,0',c,1/3,jut,min(oo,serif_drop)); fi % lower right serif
x7=.5w;
numeric hat_shift; if h<asc_height:hat_shift=-.2(asc_height-x_height);
 else:hat_shift=0; fi
hat_accent(7,g,hat_shift);
penlabels(1,2,3,4,5); labels(6); endchar;

cmchar "The letter zal";
beginchar(oct "0177",8u#,x_height#,.6desc_depth#);
italcorr x_height#*slant-.5serif_fit#-.3u#;
adjust_fit(0,.5serif_fit#);
numeric arm_thickness[],z_stem;
if hefty: arm_thickness1=Vround(vair-vair_corr); arm_thickness2=vair;
 z_stem=.6[vair,stem];
else: arm_thickness1=vair; arm_thickness2=vair'; z_stem=.9[vair,stem]; fi
pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); lft x3l=lft x4l=hround .5u;
top y1=h; y2=min(y1,h-2/3arm_thickness1);
bot y4=0; y3=max(y4,2/3arm_thickness2);
numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3));
penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
pair delta; delta=penoffset z3-z2 of currentpen;
fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
 ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
 ---cycle;  % diagonal
pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180);
top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps;
arm(5,6,a,beak_darkness,-.4beak_jut);  % upper arm and beak
pos7(arm_thickness2,-90); pos8(hair,0);
bot y7r=0; x7=x4; rt x8r=hround(w-.75u); y8=good.y(y7l+beak/1.2)+eps;
arm(7,8,b,beak_darkness,.6beak_jut);  % lower arm and beak
x9=1.5u; x10=w-x9;
bar_accent(9,10,c,-8/9desc_depth);
penlabels(1,2,3,4,5,6,7,8,9,10); endchar;