1
% tipaextr.mf: TIPX Symbols --- a supplement for TIPA.
2
% Copyright 1996-2003 FUKUI Rei
4
% This program may be distributed and/or modified under the
5
% conditions of the LaTeX Project Public License, either version 1.2
6
% of this license or (at your option) any later version.
7
% The latest version of this license is in
8
% http://www.latex-project.org/lppl.txt
9
% and version 1.2 or later is part of all distributions of LaTeX
10
% version 1999/12/01 or later.
12
% This program consists of all files listed in Manifest.txt.
14
% Version 1.2 2003/01/01
16
% (Most of the symbols are now obsolete and not adopted in
17
% the T3 encoding for TIPA.)
20
%%%%% Adaptations for Times_Compat are not yet complete.
22
numeric ipacode; ipacode := -1;
24
cmchar "Reversed Polish hook";
25
beginchar(incr ipacode,6u#,0,desc_depth#);
26
adjust_fit(if monospace: 1u#,1u# else: 0,0 fi);
27
pickup if serifs: crisp.nib; else: fine.nib; fi
28
pos1(vair,-120); pos4(vair,45);
29
if serifs: pos2(stem,170);pos3(max(.7stem,hair),100);
30
else: pos2(vair,170);pos3(vair,100); fi
31
x1+u=x4+2u=.5w; y1=0; y2l=y4r=-3/5d; bot y3l=-d-oo;
32
x3r=.7[x4r,x2r]; x2l=w-u;
33
if serifs: filldraw circ_stroke z1e{(3,-1)}...{down}z2e
34
...{left}z3e...{(-1,1)}z4e;
35
else: filldraw stroke z1e{(3,-1)}...{down}z2e...{left}z3e...{(-1,1)}z4e; fi
36
penlabels(1,2,3,4); endchar;
38
cmchar "Right-tail (long)";
39
beginchar(incr ipacode,4u#,.2x_height#,desc_depth#);
40
adjust_fit(if monospace: 2u#,2u# else: 0,0 fi);
41
if serifs: pickup tiny.nib;
42
pos1(diacr,0); lft x1l=hround(.5w-.5diacr); y1=h+oo;
43
right_tail(1,2,3,4,diacr,hround(x1+3.25u),.9,.5,.6);
44
else: pickup fine.nib;
45
pos1(vair,0); lft x1l=hround(.5w-.5vair); y1=h+oo;
46
right_tail(1,2,3,4,vair,hround(x1+3.25u),.85,.5,.5); fi
47
penlabels(1,2,3,4); endchar;
49
cmchar "Palatalization hook (long)";
50
beginchar(incr ipacode,4u#,.2x_height#,desc_depth#);
51
adjust_fit(if monospace: 2u#,2u# else: 0,0 fi);
52
if serifs: pickup tiny.nib;
53
pos1(diacr,0); lft x1l=hround(.5w-.5diacr); y1=h+oo;
54
left_tail(1,2,3,4,diacr,hround(x1-3.25u));
55
else: pickup fine.nib;
56
pos1(vair,0); lft x1l=hround(.5w-.5vair); y1=h+oo;
57
left_tail(1,2,3,4,vair,hround(x1-3.25u)); fi
58
penlabels(1,2,3,4); endchar;
60
cmchar "Palatalization hook (a variety)";
61
beginchar(incr ipacode,5u#,.2x_height#,desc_depth#);
62
adjust_fit(if monospace: 1.5u#,1.5u# else: 0,0 fi);
63
if serifs: pickup tiny.nib;
64
pos1(diacr,0); lft x1l=hround(.5w-.5diacr+.5u); y1=h+oo;
65
pos5(diacr,-90); pos6(diacr,-180); bot y5r=0; y6=.1x_height;
67
filldraw stroke z1e..z5e..z6e;
68
left_tail(1,2,3,4,diacr,hround(x1-3.25u));
69
else: pickup fine.nib;
70
pos1(vair,0); lft x1l=hround(.5w-.5vair+.5u); y1=h+oo;
71
pos5(vair,-90); pos6(vair,-135); bot y5r=0; y6=.1x_height;
73
filldraw stroke z1e..z5e..z6e;
74
left_tail(1,2,3,4,vair,hround(x1-3.25u)); fi
75
penlabels(1,2,3,4,5,6); endchar;
77
cmchar "Superscript rectangle";
78
beginchar(incr ipacode,5u#+vair#,asc_height#,0);
79
adjust_fit(if monospace: 1u#,1u# else: 0,0 fi);
80
if serifs: pickup diacritic.nib;
81
lft x1=lft x2=hround u; x3=x4=w-x1;
82
top y1=top y3=vround(h-oo); bot y2=bot y4=vround x_height;
83
draw z1--z2--z4--z3--cycle;
84
else: pickup crisp.nib;
85
pos1(vair,0); pos2(vair,0); pos3(vair,0); pos4(vair,0);
86
lft x1l=lft x2l=hround u; x3=x4=w-x1;
87
top y1=top y3=vround(h-oo); bot y2=bot y4=vround x_height;
88
filldraw stroke z1e--z2e; filldraw stroke z3e--z4e;
89
pos1'(vair,90); pos2'(vair,90); pos3'(vair,90); pos4'(vair,90);
90
lft x1'=lft x3'=hround u; x2'=x4'=w-x1;
91
top y1'r=top y2'r=vround(h-oo); bot y3'l=bot y4'l=vround x_height;
92
filldraw stroke z1'e--z2'e; filldraw stroke z3'e--z4'e; fi
93
penlabels(1,2,3,4); endchar;
95
cmchar "Superscript left arrow";
96
beginchar(incr ipacode,8u#,asc_height#,0);
97
adjust_fit(0,0); pickup crisp.nib;
98
pos1(rule_thickness,90); pos2(rule_thickness,90);
99
pos3(rule_thickness,0); pos4(rule_thickness,0);
100
y0=y1=y2; bot y4=.15[x_height,asc_height];
101
x1+.5rule_thickness=hround(w-.5u); lft x0=hround .5u;
102
y3-y0=y0-y4=if monospace:.24 else:.18 fi asc_height+eps;
103
x3=x4=x0+if monospace:3u else:2.5u fi+eps;
104
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
105
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
107
numeric t; path p; p=z4r{z9-z4}..z6r;
108
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
109
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
110
--z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
111
--z3l{z9-z3}..z0 & cycle; % arrowhead and stem
112
penlabels(0,1,2,3,4,5,6,9); endchar;
114
% Sources: Principles (1949:17), PSG (1996:231).
115
% Is this symbol a horizontal small capital I? I don't know.
116
cmchar "Retracting sign (a variety)";
117
beginchar(incr ipacode,8u#,x_height#,0);
120
v_thickness=if monospace: vair; else: .5[vair,flare]; fi
121
pickup fine.nib; pos1(v_thickness,90); pos2(v_thickness,90);
122
lft x1=lft x3l=lft x4l=hround u;
123
rt x2=rt x5r=rt x6r=hround(w-u);
124
top y1r=top y2r=vround(.5h+.5v_thickness);
125
filldraw stroke z1e--z2e;
127
pos3(stem,0); pos4(stem,0); pos5(stem,0); pos6(stem,0);
128
top y3=top y5=top y2r+v_thickness; bot y4=bot y6=bot y2l-v_thickness;
129
filldraw stroke z3e--z4e; filldraw stroke z5e--z6e;
130
x1'=x4r+.2(x2-x1); y1'=y1; pos1'(v_thickness, 90);
131
filldraw z4r{up}..{right}z1'l--z1'r{left}..{up}z3r--cycle;
132
x2'=x6l-.2(x2-x1); y2'=y2; pos2'(v_thickness, 90);
133
filldraw z5l{down}..{left}z2'r--z2'l{right}..{down}z6l--cycle; fi
134
penlabels(1,1',2,2',3,4,5,6); endchar;
136
cmchar "Down full arrow";
137
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,0);
138
adjust_fit(0,0); pickup crisp.nib;
139
pos1(rule_thickness,0); pos2(rule_thickness,0);
140
pos3(rule_thickness,90); pos4(rule_thickness,90);
141
lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
142
x0=x1=x2; bot y0=-d; x0-x3=x4-x0=if monospace:3u else:3u fi+eps;
143
y3=y4=y0+if monospace:.24 else:.27 fi asc_height+eps;
144
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
145
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
147
numeric t; path p; p=z4r{z9-z4}..z6r;
148
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
149
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
150
--z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r)
151
--z3l{z9-z3}..z0 & cycle; % arrowhead and stem
152
penlabels(0,1,2,3,4,5,6,9); endchar;
154
cmchar "Up full arrow";
155
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,0);
156
italcorr .76asc_height#*slant+.5crisp#-u#;
157
adjust_fit(0,0); pickup crisp.nib;
158
pos1(rule_thickness,0); pos2(rule_thickness,0);
159
pos3(rule_thickness,90); pos4(rule_thickness,90);
160
lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
161
x0=x1=x2; top y0=h; x0-x3=x4-x0=if monospace:3u else:3u fi+eps;
162
y3=y4=y0-if monospace:.24 else:.27 fi asc_height-eps;
163
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
164
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
166
numeric t; path p; p=z4l{z9-z4}..z6r;
167
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
168
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
169
--z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r)
170
--z3r{z9-z3}..z0 & cycle; % arrowhead and stem
171
penlabels(0,1,2,3,4,5,6,9); endchar;
173
cmchar "Subscript right arrow";
174
beginchar(incr ipacode,16u#,0,desc_depth#);
175
adjust_fit(0,0); pickup crisp.nib;
176
pos1(rule_thickness,90); pos2(rule_thickness,90);
177
pos3(rule_thickness,0); pos4(rule_thickness,0);
178
y0=y1=y2; x1-.5rule_thickness=hround .5u; rt x0=hround(w-.5u);
179
y3-y0=y0-y4=if monospace:.24 else:.18 fi asc_height+eps;
180
top y1r=vround -.67d;
181
x3=x4=x0-if monospace:3u else:2.5u fi-eps;
182
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
183
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
185
numeric t; path p; p=z4l{z9-z4}..z6r;
186
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
187
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
188
---z1l..z1r---subpath (t,0) of\\(z3l{z9-z3}..z5r)
189
--z3r{z9-z3}..z0 & cycle; % arrowhead and stem
190
penlabels(0,1,2,3,4,5,6,9); endchar;
192
cmchar "Subscript double arrow";
193
beginchar(incr ipacode,10u#,0,desc_depth#);
194
adjust_fit(0,0); pickup crisp.nib;
195
pos1(rule_thickness,90); pos2(rule_thickness,90);
196
pos3(rule_thickness,0); pos4(rule_thickness,0);
197
y0=y1=y2; lft x0=hround .1u;
198
if monospace: x1+.5rule_thickness=hround(w-.1u) else: x1=.5w fi;
199
y3-y0=y0-y4=if monospace:.24 else:.18 fi asc_height+eps;
200
top y1r=top y11r=vround -.67d;
201
x3=x4=x0+if monospace:3u else:2.5u fi+eps;
202
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
203
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
205
numeric t; path p; p=z4r{z9-z4}..z6r;
206
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
207
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
208
---z1l..z1r---subpath (t,0) of\\(z3r{z9-z3}..z5r)
209
--z3l{z9-z3}..z0 & cycle; % left arrowhead and stem
210
pos11(rule_thickness,90); pos12(rule_thickness,90);
211
pos13(rule_thickness,0); pos14(rule_thickness,0);
212
y10=y11=y12; rt x10=hround(w-.1u);
213
if monospace: x11-.5rule_thickness=hround .1u else: x11=.5w fi;
214
y13-y10=y10-y14=if monospace:.24 else:.18 fi asc_height+eps;
215
x13=x14=x10-if monospace:3u else:2.5u fi-eps;
216
pos15(rule_thickness,angle(z14-z10)); z15l=z10;
217
pos16(rule_thickness,angle(z13-z10)); z16l=z10;
218
z19=.2[.5[z13,z14],z10];
219
numeric t; path p; p=z14l{z19-z14}..z16r;
220
t=xpart(p intersectiontimes((0,y12l)--(w,y12l))); x12=xpart point t of p;
221
filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r)
222
---z11l..z11r---subpath (t,0) of\\(z13l{z19-z13}..z15r)
223
--z13r{z19-z13}..z10 & cycle; % right arrowhead and stem
224
penlabels(0,1,2,3,4,5,6,9,10,11,12,13,14,15,16,19); endchar;
228
cmchar "Right-hook A";
229
beginchar(incr ipacode,CT(9u#,8.88u#),x_height#,desc_depth#);
230
if Times_Compat: bh#:=.6x_height#;
231
else: bh#:=min(bar_height#,1.14x_height#-bar_height#); fi
233
adjust_fit(0,serif_fit# if serifs: if hair#+.5stem#>1.5u#:-.25u# fi\\fi+1u#);
234
pickup fine.nib; top y3r=h+vround 1.5oo;
235
if serifs: pos1(flare,180); pos2(hair,180); pos3(vair,90);
236
lft x1r=hround max(u,if Times_Compat:1.5u else:2.1u fi-.5flare);
237
x3=.5w if Times_Compat:-.25u else:-.5u fi;
238
y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare);
240
else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r;
241
pos3(1/8[vair,thin_join],90);
242
x3=.5w-.2u; top y1r=vround .82[bh,top y3r];
243
filldraw stroke term.e(3,1,left,.9,4); fi % terminal
244
pos4(stem,0); rt x4r=hround(w-side_gap+.5stem);
245
y4=if Times_Compat: .5 else: 1/3 fi[bh,h];
247
y5=if Times_Compat: max(.45bh,2vair) else: max(.55bh,2vair) fi;
248
filldraw stroke super_arc.e(3,4)&z4e..z5e; % arc and stem
249
pos6(.3[thin_join,vair],90); x6=x4; bot y6=if Times_Compat: 1.1 fi bh;
250
pos7(hround(curve-2stem_corr),if Times_Compat: 200 else: 180 fi);
251
lft x7r=hround max(.5u,1.5u-.5curve);
252
if Times_Compat: y7=.3[top y8l,top y6r]; pos8(.6[vair,flare],240); x8l=.5w-1u;
253
else: y7=1/3[top y8l,top y6r]; pos8(vair,270); x8l=.5w-.75u; fi
254
pos9(thin_join,360); z9l=z5l; bot y8r=-oo;
255
(x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u);
256
{{interim superness:=more_super;
257
filldraw stroke z9e{down}...z8e{left}...{up}z7e &
258
if Times_Compat: z7e{up}...{(35,10)}z6e else:
259
super_arc.e(7,6)fi}}; % bowl
260
if serifs: numeric shaved_stem; shaved_stem=hround(stem-3stem_corr);
261
if hair#+.5stem#>1.5u#: pickup tiny.nib;
262
pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
263
pos10(shaved_stem,0); x10=x5'; y10=.2[.5tiny,bh];
264
pos11(shaved_stem,0); rt x11r=hround(w-.25u); bot y11=0;
265
pos12(shaved_stem,0); x11=x12; top y12=slab+eps;
266
filldraw z5'l---z10l...z11l{right}--z11r
267
--z12r{left}...z10r+.75(z12-z11)---z5'r--cycle; % foot
268
pickup tiny.nib; x14r=x12r; y14=y12; pos14(diacr,0);
269
right_tail(14,15,16,17,diacr,hround(x14+3.25u),.9,.5,.6);
270
else: pickup crisp.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
271
pos10(shaved_stem,0); x10=x5'; y10=1/3bh;
272
pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo;
273
pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair);
274
pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12);
275
(x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10);
276
if Times_Compat: y13l:=.05[y12l,y13l]; y13r:=y13l; fi
277
filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; % hook
278
pickup tiny.nib; x14=x13; y14=y13l; pos14(hair,0);
279
right_tail(14,15,16,17,diacr,hround(x14+3.25u),.9,.5,.6); fi
280
else: numeric shaved_stem; shaved_stem=hround(stem-stem_corr);
281
pickup tiny.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
282
pos10(shaved_stem,0); x10=x5'; bot y10=0;
283
filldraw stroke z5'e--z10e; % base of stem
284
pickup fine.nib; %x14r=x5r; y14=y10; pos14(vair,0);
285
right_tail(10,15,16,17,shaved_stem,hround(w-.5u+.5hair),.85,.5,.5); fi
286
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;
288
cmchar "Inverted script A";
289
beginchar(incr ipacode,10u#+serif_fit#,x_height#,0);
290
italcorr x_height#*slant-serif_fit#+.5stem#-.5u#;
291
adjust_fit(0,serif_fit#);
292
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
293
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
294
rt x1r=hround(w-side_gap+.5stem'); bot y1=-oo;
295
numeric edge; edge=lft x2l;
296
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
297
pos4(vair,270); pos5(curve,180);
298
pos6(vair,90); penpos7(x3r-x3l,360);
299
lft x3l=1/3[lft x2,edge]; y3=h-1/8[bar_height,x_height];
300
x4l=.5(w-serif_fit)-.3u; bot y4r=-oo;
301
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
302
x6l=x4l-.2u; top y6r=h+oo;
303
x7=x3; y7=max(y3,y6+y4-y3-.6vair);
304
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
305
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
306
filldraw stroke z3e{down}...pulled_arc.e(4,5)
307
& pulled_arc.e(5,6)...{down}z7e; % bowl
308
y0=ypart(((edge,0)--(edge,h))intersectionpoint(z3l{down}...{left}z4l));
309
pickup tiny.nib; top y2=h+if serifs:min(oo,serif_drop) else: 0 fi;
310
filldraw stroke z0'e--z0e--z2e; % stem
312
pos8(hround(hair-stem_corr),0); pos7'(stem',0);
313
z7'=z0'; x8r=x7'r; bot y8=-oo;
314
filldraw stroke z7'e--z8e;
315
if serifs: inverted_sloped_serif.r(2,0,b,1/3,jut,serif_drop); fi % lower serif
316
penlabels(0,1,2,3,4,5,6,7,8); endchar;
318
cmchar "A-O Ligature";
319
beginchar(incr ipacode,CT(13u#,14.44u#),x_height#,0);
320
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0);
322
numeric left_curve,right_curve;
323
if monospace: right_curve=left_curve=fudged.stem;
324
else: left_curve=max(tiny.breadth,hround(curve-2stem_corr));
325
right_curve=max(tiny.breadth,hround(curve-if serifs:6 else:8 fi\\stem_corr));fi
326
pickup tiny.nib; pos11(right_curve,0);
327
pos12(vair,90); pos13(mfudged.stem,180);
328
y11=.5h; top y12r=h+vround 1.5oo; y10l=bot y11;
329
rt x11r=hround min(w-.5u,w-u+.5right_curve);
330
lft x13r=hround (.5w-.5mfudged.stem); x12=.5[x13,x11];
331
y13=.5[y12,y14]; bot y14r=-oo; x14=x12; pos14(vair,270);
332
filldraw stroke pulled_arc.e(12,13) & pulled_arc.e(13,14) &
333
pulled_arc.e(14,11) & pulled_arc.e(11,12);
334
y11'r=y10r=y10l+.6[thin_join,vair]; y11'l=y10l; x11'l=x11'r=x11; x10l=x10r=x13;
335
pickup fine.nib; top y3r=h+vround 1.5oo;
336
if serifs: pos1(flare,180); pos2(mfudged.hair,180);
337
pos3(vair,90); lft x1r=hround max(u,2.1u-.5flare); x3=4u;
338
y1=min(bar_height+.5flare+2vair+2,.9[bar_height,h]-.5flare);
340
else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r;
341
pos3(1/8[vair,thin_join],90);
342
x3=4.3u; top y1r=vround .82[bar_height,top y3r];
343
filldraw stroke term.e(3,1,left,.9,4); fi % left terminal
344
pos4(mfudged.stem,0); x4=x13; y4=1/3[bar_height,h];
345
pos5(mfudged.stem,0); x5=x4; y5=min(y4,y13);
346
filldraw stroke super_arc.e(3,4)&z4e--z5e; % arc and stem
347
pos6(.6[thin_join,vair],90); x6=x4; bot y6=if Times_Compat: .9 fi bar_height;
348
pos7(left_curve,180);
349
lft x7r=hround max(.5u,1.5u-.5left_curve); y7=1/3[top y8l,top y6r];
350
pos8(vair,270); x8l=3.75u; bot y8r=-oo;
351
pos9(.5[vair,fudged.stem],360); x9=x5; y9=.55bar_height;
352
(x',y8r)=whatever[z8l,z9l]; x8r:=max(x',x8-u);
353
{{interim superness:=more_super;
354
filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl
355
if y9<y5: filldraw stroke z5e{down}..{down}z9e; fi % link (usually hidden)
356
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
358
cmchar "Left-hook four";
359
beginchar(incr ipacode,CT(9u#,10u#),fig_height#,desc_depth#);
360
italcorr fig_height#*slant-.5u#;
362
numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut;
363
light_stem=hround .4[fudged.stem,fudged.cap_stem];
364
light_stem'=hround max(tiny.breadth,light_stem-2stem_corr);
365
diag_stem=max(tiny.breadth,.4[vair,fudged.hair]);
366
pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90);
367
lft x5=hround .5u; rt x6=hround(w-.5u);
368
top y5r=vround(if serifs: 5/18[slab,h-light_stem]+1
369
else:.35(h-light_stem) fi+.5cap_bar);
370
z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem);
371
penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=h+apex_o+apex_oo;
372
x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l);
373
penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0);
374
x0=x1l; z0=whatever[z3r,z4r];
375
x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l];
376
fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5'
377
---lft z5l -- (x4r,y5l) -- z4r
378
if y0<h-cut:{z3r-z4r}...{up}(x1l-1,h-cut)
379
--(x1l,h-cut) else: -- z0 fi
380
--z2l--z2r--cycle; % diagonal and upper stem
381
filldraw stroke z5e--z6e; % bar
382
pickup tiny.nib; pos7(light_stem,0); rt x7r=x1r; bot y7=0;
383
pos2'(light_stem,0); x2'=x7;
384
filldraw stroke z2'e--z7e; % lower stem
385
left_tail(7,8,9,10,light_stem,hround(lft x7-3.75u));
386
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
388
cmchar "Stretched C (original form)";
389
beginchar(incr ipacode,CT(8u#,8.88u#),x_height#,desc_depth#);
390
italcorr x_height#*slant-.2u#;
391
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
392
pickup fine.nib; pos2(vair',90); pos4(vair',270);
393
x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-d-oo;
394
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h-.5d;
395
if serifs: pos1(hair,0); pos0(flare,0);
397
y1=min(bar_height+.4flare+1.8vair'+2,.8[bar_height,h]-.5flare);
399
y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); fi
400
rt x1r=hround(w-.7u); bulb(2,1,0); % bulb
401
pos5(hair,0); rt x5r=hround(w-.5u);
402
y5=max(good.y(.5bar_height-.9-d),y4l+vair');
403
(x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u);
404
filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
405
& pulled_super_arc.e(3,4)(.5superpull)
406
..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal
407
else: pos1(4/7[vair',flare],80);
408
rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
409
filldraw stroke term.e(2,1,right,.8,4); % upper terminal
410
pos5(.6[vair',flare],275); rt x5r=hround(w-.5u);
411
y5r=good.y(y5r+1/3bar_height-y5-d); y5l:=good.y y5l; x5l:=good.x x5l;
412
forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e;
413
if angle direction 1 of p.e>75:
414
p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor
415
filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
416
& pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal
417
penlabels(0,1,2,3,4,5); endchar;
419
cmchar "Curly-tail stretched C";
420
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,desc_depth#);
421
italcorr asc_height#*slant-1u#;
423
pickup fine.nib; interim superness:=more_super;
424
pos2(.6[vair,flare],90); pos5(.6[vair,flare],270);
425
x2=x5=.5w; top y2r=vround(h+1.5oo); bot y5r=-d-oo;
426
pos3(stem,180); pos4(stem,180);
427
lft x3r=lft x4r=hround1.2u; y3=.75h; y4=0;
428
pos1(stem,0); rt x1r=hround(w-1.1u); top y1=vround .75h;
429
pos6(stem,0); rt x6r=hround(w-1u); y6=.6[-d,y7];
430
pos7(.6[vair,flare],90); x7l=.2[x5,x6]; y7=.25h+.5stem-d;
431
pos8(stem,160); lft x8r=0; bot y8=-d-oo;
432
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
433
& z3e--z4e & pulled_arc.e(4,5) & pulled_arc.e(5,6);
434
filldraw stroke z6e{up}...z7e{left}...{dir250}z8e;
435
penlabels(0,1,2,3,4,5,6,7,8); endchar;
437
cmchar "Curly-tail stretched C (original form)";
438
beginchar(incr ipacode,CT(8u#,8.88u#),x_height#,desc_depth#);
439
italcorr x_height#*slant-.2u#;
440
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
441
pickup fine.nib; pos2(vair',90); pos4(vair',270);
442
x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-d-oo;
443
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h-.5d;
444
if serifs: pos1(hair,0); pos0(flare,0);
446
y1=min(bar_height+.4flare+1.8vair'+2,.8[bar_height,h]-.5flare);
448
y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); fi
449
rt x1r=hround(w-.7u); bulb(2,1,0); % bulb
450
pos5(hair,0); rt x5r=hround(.9w); y5=.35bar_height-d+.25hair;
451
(x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u);
452
filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
453
& pulled_super_arc.e(3,4)(.5superpull)
454
..tension .9 and 1..{up}z5e; % arc and lower terminal
455
else: pos1(4/7[vair',flare],80);
456
rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
457
filldraw stroke term.e(2,1,right,.8,4); % upper terminal
458
pos5(.6[vair',flare],0); x5r=hround(w-.5u);
459
y5=.37bar_height-d+.25hair;
460
filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
461
& pulled_super_arc.e(3,4)(.5superpull) & z4e{right}...{up}z5e; fi
462
pos6(vair,90); x6l=.3[x4,x5]; y6=.6bar_height+.5vair-d;
463
pos8(hair,160); x8=u; bot y8=-d-oo;
464
filldraw stroke z5e{up}...z6e{left}...{dir250}z8e;
465
penlabels(0,1,2,3,4,5,6,8); endchar;
467
% This shape is found in PSG (1996:38).
468
cmchar "Front-hook D";
469
beginchar(incr ipacode,10u#+serif_fit#,asc_height#,0);
470
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
471
adjust_fit(3.25u#,serif_fit#);
472
d_stroke(true,true,0);
473
if serifs: pickup tiny.nib; else: pickup fine.nib; fi
474
top y8r=.95x_height; x8=2.7u;
475
front_hook(8,9,10,11,1.1stem,50,-2.75u,.4x_height,.05,1/2,.5);
476
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
478
% This shape is the original shape introduced by Daniel Jones.
479
cmchar "Front-hook D (Original)";
480
beginchar(incr ipacode,10u#+serif_fit#,asc_height#,0);
481
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
482
adjust_fit(2u#,serif_fit#);
483
d_stroke(true,true,0);
484
if serifs: pickup tiny.nib;
485
pos8(.5[vair,hair],50); pos9(vair,90); pos10(vair,180); pos11(flare,180);
486
top y8r=.95x_height; x8=2.7u;
487
top y9r=1.1x_height; x9=.5u;
488
y10=.9x_height; x10r=-1.5u;
489
filldraw stroke z8e..{left}z9e; bulb(9,10,11);%arc and bulb
490
else: pickup fine.nib;
491
pos8(.5[vair,hair],50); pos9(vair,90); pos10(vair,100);
492
top y8r=.95x_height; x8=2.7u;
493
top y9r=1.1x_height; x9=.5u;
494
y10=.9x_height; x10r=-1.5u;
495
filldraw stroke z8e..z9e{left}..z10e; fi
496
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
498
cmchar "D-B ligature";
499
beginchar(incr ipacode,CT(15u#,15.56u#),asc_height#,0);
500
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
502
numeric w_org; w_org=w; w:=10u if Times_Compat: +.28u fi;
503
d_stroke(true,false,.1h); w:=w_org;
504
pickup tiny.nib; pos11(stem',0); pos12(stem,0);
505
pos10'(stem',0); pos10(stem,0); z10l=z10'l; x10'=x11; x10=x12;
507
numeric edge; edge=rt x12r;
508
pickup fine.nib; pos13(if hefty:thin_join else: hair fi,180);
509
pos14(vair,90); pos15(curve,0); pos16(vair,-90); penpos17(x13l-x13r,-180);
510
rt x13l=max(rt x13l-(lft x13r-tiny.lft x12l),1/3[rt x12,edge]);
511
y13=1/8[bar_height,x_height];
512
x14l=w-5u+serif_fit+.5u; top y14r=x_height+oo;
513
rt x15r=hround min(w-1.35u+.5curve,w-.6u); y15=.5x_height;
514
x16l=x14l-.2u; bot y16r=-oo;
515
x17=x13; y17=min(y13,y16+y14-y13+.6vair);
517
(X,y14r)=whatever[z13l,z14l]; x14r:=min(X,.5[x14,x15r]);
518
(X',y16r)=whatever[z17l,z16l]; x16r:=min(X',.5[x16,x15r]);
519
filldraw stroke z13e{up}...pulled_arc.e(14,15)&pulled_arc.e(15,16)
521
y10=ypart(((edge,h)--(edge,0))intersectionpoint(z13l{up}...{right}z14l));
522
y12=ypart(((edge,h)--(edge,0))intersectionpoint(z16l{left}...{up}z17l));
523
pickup tiny.nib; filldraw stroke z10'e--z10e--z12e; % stem
524
pickup crisp.nib; pos18(hair,0); pos17'(stem,0);
525
z17'=z12; x18l=x17'l; bot y18=0;
526
filldraw stroke z17'e--z18e; % point
527
penlabels(0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18); endchar;
529
cmchar "Right-hook E";
530
beginchar(incr ipacode,CT(7.25u#+max(.75u#,.5curve#),8.88u#),
531
x_height#,desc_depth#);
532
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0)-1u#;
533
adjust_fit(if monospace: .25u#,.5u# else: 0,1u# fi);
534
numeric left_curve,right_curve;
535
left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi;
536
if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
537
if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
538
pickup tiny.nib; pos1(right_curve,0);
539
pos2(vair,90); pos3(left_curve,180);
540
y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1;
541
rt x1r=hround min(w-.5u,w-u+.5right_curve);
542
lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u;
543
{{interim superness:=more_super;
544
filldraw stroke super_arc.e(1,2)}}; % right bowl
545
y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u;
546
if serifs: pos4(vair',270); pos5(hair,360);
547
y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r;
548
(x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u);
549
filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
550
...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal
551
else: pos4(vair,270);
552
filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc
553
pickup fine.nib; pos4'(vair,270); z4=z4';
554
pos5(.5[vair,flare],275); rt x5r=hround(w-.6u);
555
y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
556
filldraw stroke term.e(4',5,right,1,4); fi % terminal
557
path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4);
558
y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1;
560
x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor
561
fill stroke z0e--z1'e; % crossbar
562
if serifs: pickup tiny.nib; z6=z5;
563
pos6(diacr,0); right_tail(6,7,8,9,diacr,hround(x6+3.25u),.9,.5,.6);
564
else: pickup fine.nib; x6r=x5r; y6=y5r;
565
pos6(vair,0); right_tail(6,7,8,9,vair,hround(x6+3.25u),.85,.5,.5); fi
566
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
568
cmchar "Right-hook epsilon";
569
beginchar(incr ipacode,CT(8.5u#,8.88u#),x_height#,desc_depth#);
570
italcorr x_height#*slant-1.5u#;
572
epsilon_stroke(false,3.5u);
573
if serifs: numeric bulb_diam;
574
bulb_diam=max(flare-.75(cap_stem-stem),stem);
575
pos0(bulb_diam,0); pos1(hair,0);
576
rt x0r=hround (w-u); y0=min(.9h-.5bulb_diam,.75h+.5bulb_diam);
577
bulb(2,1,0); % upper bulb
578
pos9(bot_thickness,angle(2u,-h));
579
else: pos1(hair,70); rt x1r = w-1u; top y1r = .9h;
580
filldraw stroke term.e(2,1,right,1,4);
582
rt x9r=hround (w-.75u); top y9=vround .25h-o;
583
y9r:=good.y y9r-eps; x9l:=good.x x9l;
584
filldraw stroke term.e(8,9,right,1,4); % lower terminal
585
if serifs: pickup tiny.nib; x11l=x9l; y11=y9;
586
pos11(diacr,0); right_tail(11,12,13,14,diacr,hround(x11+3.25u),.9,.5,.6);
587
else: pickup fine.nib; x11r=x9r; y11=y9r;
588
pos11(vair,0); right_tail(11,12,13,14,vair,hround(x11+3.25u),.85,.5,.5); fi
589
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;
591
% based on greekl.mf.
592
cmchar "Greek gamma";
593
beginchar(incr ipacode,10u#,x_height#,desc_depth#);
594
italcorr x_height#*slant-.5u#;
595
adjust_fit(0,0); pickup fine.nib;
596
pos1(hair,180); pos2(vstem+dw,90);
597
pos4(stem,0); pos5(vair,-90); pos6(stem,-180); pos7(stem,-180);
598
bot y1=.5772156649h; top y2r=h+oo; y4=y6=-.5d;
599
bot y5r=-d-o; top y7=h;
600
lft x1r=hround(.5u-.5hair); x2=2.5u; rt x4r=hround(w-4.2u); x5=.5[x4,x6];
601
rt x4r-lft x6r=hround stem+eps; rt x7l=hround(w-u);
602
if x4l<x6l: x4l:=x6l:=x5; fi
603
pos3(hair,angle(z4-z2)+90); x3=superness[x2,x4]; y3=superness[y4,y2];
604
filldraw stroke z1e{up}...z2e{right}...z3e{z4-z2}
605
...z4e{down}...{left}z5e; % arc
606
filldraw stroke z5e{left}...z6e{up}..{2(x7-x6),y7-y6}z7e; % stem
607
penlabels(1,2,3,4,5,6,7); endchar;
609
cmchar "Front-tail gamma";
610
beginchar(incr ipacode,10u#,x_height#,desc_depth#);
611
italcorr x_height#*slant-.5u#;
612
adjust_fit(0,0); pickup fine.nib;
613
pos1(hair,180); pos2(vstem+dw,90); pos5(stem,0); pos5'(stem,-180);
614
pos4(stem,0); pos6(stem,-180); pos7(stem,-180);
615
bot y1=.5772156649h; top y2r=h+oo; y4=y6=-.5d; top y7=h;
616
lft x1r=hround(.5u-.5hair); x2=2.5u; rt x4r=hround(w-3.8u);
617
x4=x6; rt x7l=hround(w-u); x5=x5'=x4; y5=y5'=0;
618
pos3(hair,angle(z4-z2)+90); x3=superness[x2,x4]; y3=superness[y4,y2];
619
filldraw stroke z1e{up}...z2e{right}...z3e{z4-z2}
621
filldraw stroke z5'e{up}..{2(x7-x6),y7-y6}z7e; % stem
622
left_tail(5,8,9,10,stem,hround(2u-.5hair));
623
penlabels(1,2,3,4,5,6,7); endchar;
625
cmchar "Back-tail gamma";
626
beginchar(incr ipacode,10u#,x_height#,desc_depth#);
627
italcorr x_height#*slant-.5u#;
628
adjust_fit(0,0); pickup fine.nib;
629
pos1(hair,180); pos2(vstem+dw,90); pos5(stem,0); pos5'(stem,-180);
630
pos4(stem,0); pos6(stem,-180); pos7(stem,-180);
631
bot y1=.5772156649h; top y2r=h+oo; y4=y6=-.5d; top y7=h;
632
lft x1r=hround(.5u-.5hair); x2=2.5u; rt x4r=hround(w-4.2u);
633
x4=x6; rt x7l=hround(w-u); x5=x5'=x4; y5=y5'=0;
634
pos3(hair,angle(z4-z2)+90); x3=superness[x2,x4]; y3=superness[y4,y2];
635
filldraw stroke z1e{up}...z2e{right}...z3e{z4-z2}
637
filldraw stroke z5'e{up}..{2(x7-x6),y7-y6}z7e; % stem
638
right_tail(5,8,9,10,stem,hround(w-u),.88,.5,1/3);
639
penlabels(1,2,3,4,5,6,7); endchar;
641
cmchar "Right-tail hooktop H";
642
beginchar(incr ipacode,10u#,asc_height#,desc_depth#);
643
italcorr .7[x_height#,asc_height#]*slant-serif_fit#+.5stem#-u#;
644
adjust_fit(serif_fit#+stem_shift#,-stem_shift#);
645
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
646
pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
647
lft x1l=hround(side_gap-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
648
top y1=.25[x_height,h]; bot y2=0; y1=y1'; y2=y2';
649
filldraw stroke z1'e--z2'e; % left stem
650
h_stroke(2,a,3,4); % arch and right stem
651
if serifs: numeric inner_jut; pickup tiny.nib;
652
if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
653
else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
654
dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower left serif
655
hooktop(1,9,10,11,stem',rt x3r,h,.8,.55,.2);
656
if serifs: right_tail(4,5,6,7,stem,hround(w+1u),.88,.5,1/3);
657
else: right_tail(4,5,6,7,stem,hround(w+1u),.833,.5,1/3); fi
658
penlabels(1,2,3,4,5,6,7,9,10,11); endchar;
661
beginchar(incr ipacode,10u#,asc_height#,desc_depth#);
662
italcorr .5[bar_height#,x_height#]*slant+.5stem#-1.25u#;
663
adjust_fit(serif_fit#+stem_shift#,-stem_shift#-.5u#);
664
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
665
pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
666
lft x1l=hround(side_gap-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
667
top y1=h; bot y2=0; y1=y1'; y2=y2';
668
filldraw stroke z1'e--z2'e; % left stem
669
h_stroke(2,a,3,4); % arch and right stem
670
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
671
numeric inner_jut; pickup tiny.nib;
672
if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
673
else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
674
dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower left serif
675
left_tail(4,5,6,7,stem,rt x2r);
676
penlabels(1,2,3,4,5,6,7); endchar;
678
% Moved from tipasym2.mf (2001/11/23 fkr)
679
cmchar "Left-hooktop I";
680
beginchar(incr ipacode,CT(6u#,6.66u#),x_height#,0);
681
italcorr x_height#*slant-2u#;
682
adjust_fit(0 if monospace:+1u# fi,serif_fit# if monospace:+1u# fi);
683
pickup tiny.nib; pos3(stem,0); x2=x3; bot y3=0;
684
x0=.75u; lft x2l = hround(.5w+.5u-.5stem); hook_in(0,1,2);
685
filldraw stroke z2e--z3e;
686
dish_serif(3,2,a,1/3,jut,b,1/3,jut);
687
penlabels(0,1,2,3); endchar;
689
% The shape of the upper serif differs from the normal Curly-tail J.
690
cmchar "Curly-tail J (a variety found in 1996 IPA)";
691
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
692
beginchar(incr ipacode,CT(5.5u#,5.56u#),
693
min(asc_height#,10/7x_height#+.5dot_diam#),desc_depth#);
694
define_whole_blacker_pixels(dot_diam);
695
italcorr h#*slant-serif_fit#+.5stem#-2u#;
696
adjust_fit(serif_fit#+2stem_shift# if monospace:+1.5u# fi +.5u#,
697
-2stem_shift# if monospace:+1u# fi +.3u#);
698
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
699
rt x1r=hround(.5w+.25u+.5stem'); x1=x2;
700
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
701
filldraw stroke z1e--z2e; % stem
702
pos3(dot_diam,0); pos4(dot_diam,90);
703
x3r=x1r; top y4r=h+1;
704
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
705
x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot
706
if serifs: dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper serif
707
pickup tiny.nib; pos5(vair,-90); pos6(hair,-180);
708
pos7(vair,-270); pos8(vair,-270);
709
x5=.5[x2,x6r]; bot y5r=-d-oo; y6=-.6d;
710
if monospace: lft x6r=0 else: x6r=-.3u fi;
711
(x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]);
712
y7r=y8r=0h; x7=x2l-.5u; x8=w-.5u;
713
filldraw stroke z2e{down}...z5e{left}...z6e{up}...z7e{right}---z8e;
714
else: pickup fine.nib; pos2'(stem',0); z2'=z2;
715
pos6(.2[vair,stem'],-90); pos7(vair,-180);
716
pos8(vair,-270); pos9(vair,-270);
717
lft x7r=hround -.75u; y7=-.5d;
718
z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r;
719
x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
720
bot y8l = bot y9l = vround(-.5vair); x8 = .5[x7,x2]; x9 = w;
721
filldraw stroke z2'e..{down}z5e & super_arc.e(5,6)
722
& z6e{left}..z7e...{right}z8e--z9e; fi % arc and terminal
723
penlabels(1,2,3,4,5,6,7,8); endchar;
725
% Bar postion differs from the normal Hooktop Barred Dotless J.
726
cmchar "Hooktop barred dotless J (a variety)";
727
beginchar(incr ipacode,CT(6u#,6.66u#),.9asc_height#,desc_depth#);
728
italcorr h#*slant+1u#;
729
adjust_fit(if monospace: 1.5u#,1.5u# else: 0,0 fi);
730
pickup if serifs: tiny.nib; else: fine.nib; fi
731
pos1(stem',0); pos2(stem',0); x1=x2=.5w;
732
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
733
filldraw stroke z1e--z2e; % stem
734
left_tail(2,5,6,7,stem',hround-.75u);
735
hooktop(1,8,9,10,stem',hround(w+.75u),h,.84,.5,.4);
736
pickup crisp.nib; bot y3l=bot y4l=0; lft x3=x2-2.5u; x4=w-x3;
737
pos3(bar,90); pos4(bar,90);
738
filldraw stroke z3e--z4e; % bar
739
penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
741
cmchar "H-M ligature";
742
beginchar(incr ipacode,CT(15u#,15.56u#),asc_height#,0);
743
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
744
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
745
numeric shaved_stem; shaved_stem=hround(mfudged.stem-2stem_corr);
746
pickup tiny.nib; pos1(mfudged.stem,0); pos2(mfudged.stem,0);
747
pos1'(shaved_stem,0); pos2'(shaved_stem,0);
748
pos3(mfudged.stem,0); pos5(mfudged.stem,0);
749
lft x1l=hround(side_gap-.5stem); x1l=x1'l=x2l=x2'l; % stem, sic
750
lft x3l=hround(.5w-.5mfudged.stem); x5-x3=x3-x1;
751
if not monospace: r:=hround(x5+x1)+r-w; fi % change width for better fit
752
top y1=h; bot y2=0; y1=y1'; y2=y2';
753
filldraw stroke z1'e--z2'e; % left stem
754
h_stroke(2,a,3,4); % left arch and middle stem
755
h_stroke(4,b,5,6); % right arch and right stem
756
if serifs: sloped_serif.l(1',2',c,1/3,jut,serif_drop); % upper left serif
757
numeric inner_jut; pickup tiny.nib;
758
if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
759
else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
760
dish_serif(2,1,d,1/3,jut,e,1/3,jut); % lower left serif
761
dish_serif(4,3,f,1/3,inner_jut,g,1/3,jut); % lower middle serif
762
dish_serif(6,5,h,1/3,inner_jut,i,1/3,jut); fi % lower right serif
763
penlabels(1,2,3,4,5,6); endchar;
765
% This shape is found in PSG(1996:119).
766
cmchar "Front-bar N";
767
beginchar(incr ipacode,10u#,x_height#,0);
768
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
769
adjust_fit(2u#+serif_fit#+stem_shift#,serif_fit#-stem_shift#);
770
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
771
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
772
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
773
lft x1l=hround(side_gap-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
774
top y1=h; bot y2=0; y1=y1'; y2=y2';
775
filldraw stroke z1'e--z2'e; % left stem
776
h_stroke(2,a,3,4); % arch and right stem
778
numeric inner_jut; pickup tiny.nib;
779
if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
780
else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
781
dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
782
dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
784
pos5(.8[vair,stem],90);pos6(hair,180);
785
top y5r=h; x5=x1; lft x6r=hround -1.5u; y6=good.y(y5l-beak/2.4)-eps;
786
arm(5,6,b,beak_darkness, -.8beak_jut);
787
penlabels(1,2,3,4,5,6); endchar;
789
% Moved from tipasym2.mf (2001/11/23 fkr)
790
cmchar "Right leg N";
791
beginchar(incr ipacode,10u#,x_height#,desc_depth#);
792
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
793
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#-.5u#);
794
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
795
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
796
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
797
lft x1l=hround(side_gap-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
798
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
799
filldraw stroke z1'e--z2'e; % left stem
800
h_stroke(2,a,3,4); % arch and right stem
801
pos5(stem,0); x5=x3; bot y5=-d;
802
filldraw stroke z4e--z5e;
803
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
804
numeric inner_jut; pickup tiny.nib;
805
if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
806
else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
807
dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
808
dish_serif(5,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
809
penlabels(1,2,3,4); endchar;
811
% PSG (1996:130). \textbf{(I'm sorry; the codes below are a makeshift.)}
812
cmchar "Female sign";
813
beginchar(incr ipacode,CT(9u#,10u#),x_height#,desc_depth#);
814
italcorr .7x_height#*slant;
815
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
816
penpos1(rule_thickness,90); penpos3(rule_thickness,-90);
817
penpos2(rule_thickness,180); penpos4(rule_thickness,0);
818
x2r=hround .8u; x4r=w-x2r; x1=x3=.5w;
819
y1r=h+o; y3r=.05h; y2=y4=.5[y3,y1];
820
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
821
& pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl
822
penpos5(rule_thickness,0); penpos6(rule_thickness,0);
823
y5=y3; y6=-d-o; x5=x6=.5w; penstroke z5e--z6e;
824
penpos7(rule_thickness,90); penpos8(rule_thickness,90);
825
y7=y8=.5[y6,y3]; x7=hround 1.5u; x8=w-x7; penstroke z7e--z8e;
826
penlabels(1,2,3,4,5,6,7,8); endchar;
828
% PSG (1996:131). \textbf{(I'm sorry; the codes below are a makeshift.)}
829
cmchar "Uncrossed female sign";
830
beginchar(incr ipacode,CT(9u#,10u#),x_height#,desc_depth#);
831
italcorr .7x_height#*slant;
832
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
833
penpos1(rule_thickness,90); penpos3(rule_thickness,-90);
834
penpos2(rule_thickness,180); penpos4(rule_thickness,0);
835
x2r=hround .8u; x4r=w-x2r; x1=x3=.5w;
836
y1r=h+o; y3r=.05h; y2=y4=.5[y3,y1];
837
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
838
& pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl
839
penpos5(rule_thickness,0); penpos6(rule_thickness,0);
840
y5=y3; y6=-d-o; x5=x6=.5w; penstroke z5e--z6e;
841
penlabels(1,2,3,4,5,6); endchar;
843
% Moved from tipasym2.mf (2001/11/23 fkr)
844
cmchar "Bull's eye (an old version)";
845
beginchar(incr ipacode,asc_height#+2(u#+o#),asc_height#,0); autorounded;
846
adjust_fit(if monospace:-1u#,-1u# else: 0,0 fi); pickup light_rule.nib;
847
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
848
circle_points; draw_circle; % circle
849
fill fullcircle scaled(dot_size+eps) shifted(.5[z4,z8]); % dot
850
labels(1,2,3,4,5,6,7,8); endchar;
852
cmchar "Right-hook open O";
853
beginchar(incr ipacode,CT(8u#,8.88u#),x_height#,desc_depth#);
854
italcorr x_height#*slant-.5u#;
855
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
856
numeric BH; BH=if Times_Compat:.5613h else: bar_height fi;
857
pickup fine.nib; pos2(vair',-90); pos4(vair',90);
858
x2=x4=.5(w-u); bot y2r=vround(-1.5oo); top y4r=h+oo;
859
pos3(curve,0); rt x3r=hround min(w-.6u,w-1.35u+.5curve); y3=.5h;
860
if serifs: pos1(hair,-180); pos0(flare,-180);
861
y1=max(h-BH-.5flare-2vair'-2,h-.9[BH,h]+.5flare);
862
lft x1r=hround(.7u); bulb(2,1,0); % bulb
863
pos5(hair,-180); lft x5r=hround(.5u);
864
y5=min(h-good.y(.5BH-.9),y4l-vair');
865
(x,y4l)=whatever[z4r,z5l]; x4l:=x;
866
filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
867
& pulled_super_arc.e(3,4)(.5superpull)
868
..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal
869
else: pos1(4/7[vair',flare],-100);
870
lft x1r=hround(.6u); bot y1r=h-vround .82[BH,top y4r];
871
filldraw stroke term.e(2,1,left,.8,4); % upper terminal
872
pos5(.6[vair',flare],95); lft x5r=hround .5u;
873
y5r=good.y(h+y5r-1/3BH-y5);
874
y5l:=good.y y5l; x5l:=good.x x5l;
875
filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
876
& pulled_super_arc.e(3,4)(.5superpull)
877
..tension .9 and 1..z5e; fi % arc and lower terminal
878
if serifs: pickup tiny.nib; x6l=x0r; y6=y0;
879
pos6(diacr,0); right_tail(6,7,8,9,diacr,hround(x6+3.25u),.9,.5,.6);
880
else: pickup fine.nib; x6l=x1r; y6=y1r;
881
pos6(vair,0); right_tail(6,7,8,9,vair,hround(x6+3.25u),.85,.5,.5); fi
882
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
884
cmchar "Inverted omega";
885
beginchar(incr ipacode,11u#,x_height#,0);
886
italcorr .6x_height#*slant;
887
adjust_fit(0,0); pickup fine.nib;
888
pos2(curve,0); rt x2r=hround(w-.5u); y2=y8=.55h;
889
y4=y6=vround.4h; y1r=-oo; x1=x5=.5w; pos1(vair,270);
890
pos3(vair,90); pos4(hair,180); pos5(vair,270);
891
pos6(hair,0); pos7(vair,90); pos8(curve,180);
892
top y3r=top y7r=h+oo; bot y5r=vround(.9[0,y4]-.5vair);
893
x3=.5[x2,x4]; x7=.5[x6,x8]; lft x8r=hround .5u;
894
x5=.5[x4,x6]; rt x6r-lft x4r=min(stem,2hair)+2eps;
895
if x4l>x6l: x4l:=x6l:=x5; fi
896
pos9(vair,290);pos10(vair,250);
897
y9r=y10r=0; x9=w-x10=x2+1/2(x1-x2);
898
filldraw stroke z9e{dir30}...z2e{up}...z3e{left}
899
...{down}z4e...{right}z5e; % left arc
900
filldraw stroke z5e{right}...z6e{up}...z7e{left}
901
...{down}z8e...z10e{dir330};
902
penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
904
cmchar "Left-hook P";
905
beginchar(incr ipacode,10u#+serif_fit#,x_height#,desc_depth#);
906
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
907
adjust_fit(serif_fit#+.5u#,0);
908
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
909
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
910
lft x1l=hround(side_gap-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi;
911
numeric edge; edge=rt x2r;
912
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
913
pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
914
rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]);
915
y3=1/8[bar_height,x_height];
916
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
917
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
918
x6l=x4l-.2u; bot y6r=-oo;
919
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
920
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
921
(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]);
922
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
923
&super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl
924
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
925
pickup tiny.nib; bot y2=0;
926
filldraw stroke z1e--z0'e--z0e--z2e; % stem
927
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
928
z7'=z2; x8l=x7'l; bot y8=0;
929
filldraw stroke z7'e--z8e; % point
930
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi % upper serif
931
left_tail(2,9,10,11,stem,hround(-.75u));
932
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
934
cmchar "Q-P ligature";
935
beginchar(incr ipacode,CT(15u#,15.56u#),x_height#,desc_depth#);
936
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
938
numeric w_org; w_org=w; w:=10u if Times_Compat: +.28u fi;
939
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
940
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
941
rt x1r=hround(w-side_gap+.5stem');
942
numeric edge; edge=lft x2l;
943
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
944
pos4(vair',90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
945
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
946
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
947
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
948
x6l=x4l-.2u; bot y6r=-oo; y7=min(y3,y6+y4-y3+.6vair);
949
lft x7l=min(lft x7l-(rt x7r-tiny.rt x2r),1/3[lft x2,edge]);
950
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
951
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
952
filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
953
&super_arc.e(5,6)&z6e{right}...{up}z7e; % bowl
954
y1=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
955
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{right}...{up}z7l));
956
pickup tiny.nib; bot y2=-d;
957
filldraw stroke z1e--z0'e--z0e--z2e; % stem
959
pos8(hround(hair-stem_corr),0); pos7'(stem',0);
960
z7'=z1; x8r=x7'r; top y8=h+oo;
961
filldraw stroke z7'e--z8e; % point
962
if serifs: dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif
964
pickup tiny.nib; pos11(stem',0); pos12(stem,0);
965
pos10'(stem',0); pos10(stem,0); z10l=z10'l; x10'=x11; x10=x12;
966
x11l=x1l; top y11=h if serifs: +min(oo,serif_drop) fi;
967
numeric edge; edge=rt x12r;
968
pickup fine.nib; pos13(if hefty:thin_join else: hair fi,180);
969
pos14(vair',90); pos15(curve,0); pos16(vair,-90); penpos17(x13l-x13r,-180);
970
rt x13l=max(rt x13l-(lft x13r-tiny.lft x12l), 1/3[rt x12,edge]);
971
y13=1/8[bar_height,x_height];
972
x14l=w-5u+serif_fit+.5u; top y14r=x_height+oo;
973
rt x15r=hround min(w-1.35u+.5curve,w-.6u); y15=.5x_height;
974
x16l=x14l-.2u; bot y16r=-oo;
975
x17=x13; y17=min(y13,y16+y14-y13+.6vair);
977
(X,y14r)=whatever[z13l,z14l]; x14r:=min(X,.5[x15r,x14]);
978
(X',y16r)=whatever[z17l,z16l]; x16r:=min(X',.5[x15r,x16]);
979
filldraw stroke z13e{up}...{right}z14e&super_arc.e(14,15)
980
&super_arc.e(15,16)&z16e{left}...{up}z17e; % bowl
981
penlabels(0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18); endchar;
983
cmchar "Reversed esh with top loop";
984
beginchar(incr ipacode,CT(5u#,5.56u#),asc_height#,desc_depth#);
985
italcorr asc_height#*slant-1u#;
986
adjust_fit(.5hair#+.25u# if monospace:+1u# fi,.5u# if monospace:+1.5u# fi);
987
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
988
lft x1l=hround(.5w-.5stem'); x2=x1; y2=0; h-y1=d;
989
filldraw stroke z1e--z2e; % stem
990
if serifs: right_tail(2,3,4,5,stem',hround(w+1u),.88,.5,1/3);
991
else: right_tail(2,3,4,5,stem',hround(w+1u),.833,.5,1/3); fi
992
if serifs: pickup tiny.nib;
993
pos1.a(stem',0); z1=z1.a;
994
x6=x1.a; top y6=1/3[y1.a,h]; pos6(stem',0);
995
pos7(vair,90); pos8(hair,180); pos9(vair,270); pos10(hair,360);
996
x7=x9=.5[x6,x8r]; top y7r=h+oo; y9r=.4[x_height,h]-vair;
997
y8=y10=.5[y9r,y7r]; lft x8r=hround-.5u; x10r=x1;
998
filldraw stroke z1.a e--z6e{up}...z7e{left}...z8e{down}...
999
{right}z9e...{up}z10e; % arc and loop
1000
else: pickup fine.nib;
1001
pos1.a(stem',0); z1=z1.a;
1002
x6=x1.a; top y6=1/3[y1.a,h]; pos6(stem',0);
1003
pos7(vair,90); pos8(.5[vair,flare],180); pos9(vair,270);
1004
pos10(.5[vair,flare],315);
1005
x7=x9=.5[x6r,x8r]; top y7r=h+o; y9r=.4[x_height,h]-vair;
1006
lft x8r=hround(-.5u-.5vair); y8=y10=.5[y9r,y7r]; x10l=x1l;
1007
filldraw stroke z1.a e--z6e & super_arc.e(6,7)
1008
& z7e{left}...z8e{down}...{right}z9e...{up}z10e; fi
1009
penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
1011
% This shape is found in PSG (1996:176).
1012
cmchar "Front-hook T";
1013
beginchar(incr ipacode,6u#+max(u#,.5stem#),
1014
min(asc_height#,if hefty:9/7 else:10/7 fi\\ x_height#),0);
1015
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
1016
adjust_fit(3u#,if serifs: 0 else: -.5u# fi);
1017
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
1018
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
1019
lft x2r=lft x3r=hround(side_gap-.5shaved_stem);
1020
y2=y8; y3=max(.5bar_height,2vair);
1021
pickup crisp.nib; pos8(bar,90);
1022
rt x8=hround(w-1.3u); top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
1023
if hefty: pos7(bar,90);
1024
filldraw stroke z7e--z8e; % crossbar
1025
pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
1026
rt x1r=fine.rt x2l; top y1=h;
1027
penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
1028
filldraw stroke z1e--z2'e; % upper terminal
1029
else: pos7(vair,90); pos1(hair,0);
1030
rt x1r=fine.rt x2l; top y1=h;
1031
filldraw z1l{down}...{left}z7r--z7l--z8l
1032
--z8r--(x1r,y8r)--z1r--cycle; fi % upper terminal and crossbar
1033
pickup fine.nib; interim superness:=more_super;
1034
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u);
1035
if serifs: pos5(hair,0); y5=y3; x4l=.5[x3l,x5l];
1036
(x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
1037
filldraw stroke z2e..super_arc.e(3,4)...{up}z5e; % stem and hook
1038
pickup crisp.nib; pos6(hair,0); pos5'(hair,0);
1039
x6=x5=x5'; top y6=max(vround .75bar_height,top y5); y5=y5';
1040
if Times_Compat: y6l:=.2[y5l,y6l]; y6r:=y6l; fi
1041
filldraw stroke z5'e--z6e; % terminal
1042
else: pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
1043
x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
1044
filldraw stroke z2e..super_arc.e(3,4); % stem and hook
1045
path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e; % terminal
1046
if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
1047
filldraw stroke z4e{right}...{up}z5e;
1048
else: filldraw p; fi fi;
1050
front_hook(10,11,12,13,bar,90,-2.5u,.55x_height,.05,1/2,.5);
1051
penlabels(1,2,3,4,5,6,7,8,10,11,12,13); endchar;
1053
cmchar "Curly-tail turned T";
1054
beginchar(incr ipacode,6u#+max(u#,.5stem#),x_height#,desc_depth#);
1055
italcorr .7x_height#*slant -.5u#;
1056
adjust_fit(if serifs: 0 else: -.5u# fi,0 if monospace:+1u# fi);
1057
numeric shaved_stem,td; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
1058
td=min(asc_height,if hefty:9/7 else:10/7 fi\\ x_height)-x_height;
1060
pickup fine.nib; pos2(shaved_stem,0);pos3(shaved_stem,0);
1061
rt x2r=rt x3r=hround(w-(2.5u-.5shaved_stem));
1062
y2=y8; y3=min(h-.5bar_height,h-2vair);
1063
pickup crisp.nib; pos8(bar,270);
1064
lft x8=hround 1.3u; bot y8r=0; rt x7=hround(w-1/3u); y7l=y8l;
1065
if hefty: pos7(bar,270);
1066
filldraw stroke z7e--z8e; % crossbar
1067
pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),180);
1068
lft x1r=fine.lft x2l; bot y1=-td;
1069
penpos2'(x1l-x1r,180); x2'=x1; y2'=y2;
1070
filldraw stroke z1e--z2'e; % upper terminal
1071
else: pos7(vair,270); pos1(hair,180);
1072
lft x1r=fine.lft x2l; bot y1=-td;
1073
filldraw z1l{up}...{right}z7r--z7l--z8l
1074
--z8r--(x1r,y8r)--z1r--cycle; fi % upper terminal and crossbar
1075
pickup fine.nib; interim superness:=more_super;
1076
pos4(vair',90); top y4r=h+oo; lft x5r=hround u;
1077
if serifs: pos5(hair,180); y5=y3; x4l=.5[x3l,x5l];
1078
(x,y4r)=whatever[z4l,z5l]; x4r:=min(x,.5[x3r,x4]);
1079
filldraw stroke z2e..super_arc.e(3,4)...{down}z5e; % stem and hook
1080
pickup crisp.nib; pos6(hair,180); pos5'(hair,180);
1081
x6=x5=x5'; bot y6=min(vround (h-.75bar_height),bot y5); y5=y5';
1082
if Times_Compat: y6l:=.2[y5l,y6l]; y6r:=y6l; fi
1083
filldraw stroke z5'e--z6e; % terminal
1084
else: pos5(vair,105); bot y5l=vround .2[bot y4l,h-bar_height];
1085
x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l-.2vair;
1086
filldraw stroke z2e..super_arc.e(3,4); % stem and hook
1087
path p; p=stroke z4e{left}..tension .9 and atleast 1..z5e; % terminal
1088
if (xpart(z5l-precontrol 1 of p)>=0) or (xpart(z5r-postcontrol 2 of p)>=0):
1089
filldraw stroke z4e{left}...{down}z5e;
1090
else: filldraw p; fi fi;
1091
if serifs: pos10(vair,90); pos11(hair,10); pos12(vair,-100); pos13(hair,190);
1092
else: pos10(vair,90); pos11(.6hair,10); pos12(vair,-100); pos13(vair,240); fi
1093
bot y10l=-d-o; x10=.4[x11,x1]; lft x11l=hround 1u; y11=-.7d;
1094
z12=(x1,-.4d); lft x13r=hround(w-1u); y13=-d-o;
1095
filldraw stroke z1e..tension .9 and atleast 1..{left}z10e...z11e
1096
...z12e...{down}z13e;
1097
penlabels(1,2,3,4,5,6,7,8,10,11,12,13); endchar;
1099
cmchar "Turned two";
1100
beginchar(incr ipacode,CT(9u#,10u#),x_height#,fig_height#-x_height#);
1101
italcorr x_height#*slant-.5serif_fit#-.3u#;
1103
numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair];
1104
arm_thickness=Vround(if hefty:slab+2stem_corr else:.4[stem,cap_stem] fi);
1105
pickup crisp.nib; pos7(arm_thickness,90); pos8(hair,180);
1106
top y7r=h; rt x7=hround(w-.9u); lft x8r=hround .9u; y8=good.y(y7l-beak/2)-eps;
1107
arm(7,8,a,.3beak_darkness,-beak_jut); % arm and beak
1108
pickup fine.nib; pos2(slab,270); pos3(.4[curve,cap_curve],180);
1109
bot y2r=-d-o; x2=.5(w+.5u); lft x3r=hround .9u; y3-.5vair=h-.75(h+d);
1110
if serifs: numeric bulb_diam; bulb_diam=hround(flare+2/3(cap_stem-stem));
1111
pos0(bulb_diam,360); pos1(cap_hair,360);
1112
rt x1r=hround(w-.9u); y1+.5bulb_diam=h-2/3(h+d);
1113
(x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0); % bulb and arc
1114
else: x2l:=x2l+.25u; pos1(flare,angle(-9u,h)+180);
1115
rt x1r=hround(w-.75u); top y1l=vround (h-.7(h+d));
1116
y1r:=good.y y1r-eps; x1l:=good.x x1l;
1117
filldraw stroke term.e(2,1,right,.9,4); fi % terminal and arc
1118
pos4(.25[hair_vair,cap_stem],180);
1119
pos5(hair_vair,180); pos6(hair_vair,180);
1120
y5=h-arm_thickness; y4=.3[y5,y3]; bot y6=max(y5,h-slab,bot y7l);
1121
rt x6l=crisp.rt x7; z4l=whatever[z6l,(x3l,top (h-.58(h+d)))];
1122
z5l=whatever[z6l,z4l];
1123
erase fill z4l--z6l--rt z6l--(rt x6l,y4l)--cycle; % erase excess at left
1124
filldraw stroke z2e{left}..tension atleast .9 and atleast 1
1125
..z3e{up}.. z4e---z5e--z6e; % stroke
1126
penlabels(0,1,2,3,4,5,6,7,8); endchar;
1128
cmchar "Bent-tail yogh";
1129
beginchar(incr ipacode,CT(8u#,8.88u#),x_height#,desc_depth#);
1130
italcorr x_height#*slant-.5serif_fit#-.3u#;
1131
adjust_fit(0,.5serif_fit#);
1132
numeric arm_thickness[],z_stem,stem[];
1133
stem1=fudged.stem-4stem_corr;
1134
if hefty: arm_thickness1=stem1; arm_thickness2=stem1;
1136
else: arm_thickness1=stem1; arm_thickness2=stem1; z_stem=fudged.hair; fi
1137
if arm_thickness1<tiny.breadth: arm_thickness1:=tiny.breadth; fi
1138
pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u);
1139
lft x3l=lft x4l=hround .3[.5u, w-.8u];
1140
top y1=h; y2=min(y1,h-2/3arm_thickness1);
1141
bot y4=.4[0,h]; y3=max(y4,2/3arm_thickness2);
1142
numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3));
1143
penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
1144
penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
1145
pair delta; delta=penoffset z3-z2 of currentpen;
1146
fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
1147
---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
1148
---cycle; % diagonal
1149
pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180);
1150
top y5r=h; x5=x1; lft x6r=hround .75u;
1151
y6=good.y(y5l-beak/1.8)-eps;
1152
arm(5,6,a',beak_darkness,-.4beak_jut); % upper arm and beak
1154
pos12(stem,angle(z2-z3)); z12l=z3l;
1155
pos7(curve,-20); pos8(curve,-20); pos9(vair,90); pos10(hair,135);
1156
rt x7r=hround(w-.75u); y7=.2[bot y12l,top y8l];
1157
x8=hround .3[.75u, w-.8u]; y8=-1/2d;
1158
x9=.5[x8l,x7r]; bot y9l=-d-oo;
1159
x10=x7r; y10=.7[y9,y8];
1160
filldraw stroke z12e{right}...z7e{down}.. tension 1.2 ..{down}z8e...
1161
{right}z9e...z10e; % bowl and tail
1162
penlabels(1,2,3,4,5,6,7,8,9,10,12); endchar;
1164
cmchar "Turned three";
1165
beginchar(incr ipacode,CT(9u#,10u#),x_height#,fig_height#-x_height#);
1166
italcorr x_height#*slant-.5u#;
1168
numeric top_thickness,mid_thickness,bot_thickness;
1169
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
1170
mid_thickness=max(fine.breadth,vround 2/3vair);
1171
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
1172
pickup fine.nib; pos2(top_thickness,270); bot y2r=-d-o;
1173
pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),180);
1174
lft x3r=hround 1.25u;
1175
pos4(vair,90); pos5(vair,90);
1176
pos6(mid_thickness,270); x2=x6=x8=.5[w-1.5u,x7];
1177
pos7(cap_curve,180); lft x7r=hround .75u; rt x5=max(hround(w-3u),rt x6)+eps;
1178
pos8(bot_thickness,90); top y8r=h+o;
1179
y3=.6[bot y4l,top y2l]; y7=.5[top y6l,bot y8l];
1180
bot y5l=vround(h-.54(h+d)-.5vair); y5r=y6l;
1181
x4=1/3[x5,x3l]; z4=z5-whatever*(15u,.1(h+d));
1182
filldraw stroke pulled_super_arc.e(2,3)(.5superpull)
1183
& z3e{up}...z4e---z5e; % upper bowl
1184
filldraw z5r--z6l--z6r--z5l---cycle; % middle tip
1185
filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
1186
& pulled_super_arc.e(7,8)(.5superpull); % lower bowl
1187
if serifs: numeric bulb_diam[];
1188
bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem;
1189
pos0(bulb_diam1,360); pos1(hair,360);
1190
rt x0r=hround(w-1.25u);
1191
y0=max((h-.9(h+d))+.5bulb_diam1,(h-.75(h+d))-.5bulb_diam1);
1192
bulb(2,1,0); % upper bulb
1193
pos10(bulb_diam2,0); pos9(cap_hair,0);
1194
rt x10r=hround(w-.75u);
1195
y10=min((h-.1(h+d))-.5bulb_diam2,(h-.3(h+d))+.5bulb_diam2);
1196
bulb(8,9,10); % lower bulb
1197
else: pos1(.5[vair,flare],angle(-8u,h)+180);
1198
rt x1r=hround(w-u); top y1l=vround(h-.75(h+d))-o;
1199
y1r:=good.y y1r-eps; x1l:=good.x x1l;
1200
pos9(bot_thickness,angle(-2u,-h)+180);
1201
rt x9r=hround(w-.75u); bot y9l=vround(h-.25(h+d))+o;
1202
y9r:=good.y y9r+eps; x9l:=good.x x9l;
1203
filldraw stroke term.e(2,1,right,1,4); % upper terminal
1204
filldraw stroke term.e(8,9,right,1,4); fi % lower terminal
1205
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
1207
% N.B. This symbols is not a descender.
1208
cmchar "Curly-tail inverted glottal stop";
1209
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,0);
1210
italcorr .5x_height#*slant;
1212
pickup tiny.nib; pos2(vair,-90); pos3(curve,0);
1213
pos4(vair,90); pos5(stem,0); pos6(stem,0);
1214
x5=x6; x2=.5w; x4=x5l; rt x3r=hround(w-u);
1215
lft x6l=hround(.42w-.5stem); top y6=h;
1216
bot y2r=-oo; y3=.5[y2,y4]; y4r=.9x_height; y5=y4l;
1217
{{interim superness:=more_super;
1218
filldraw stroke pulled_super_arc.e(2,3)(superpull)
1219
& z3e{up}...{(-10,-1)}z4e;
1220
filldraw stroke z5e--z6e\\}}; % arc and stem
1221
pos1(stem-stem_corr, 180); lft x1r=hround u; y1=.5[y3,y2];
1222
pos7(vair,-270); x7=.2[x2,x6]; y7=.3[y3,y2];
1223
pos8(hair,0); rt x8r=hround(w-2u); bot y8=-.15x_height;
1224
filldraw stroke z2e{left}...{up}z1e...z7e...{dir-80}z8e;
1225
penlabels(0,1,2,3,4,5,6,7,8); endchar;
1227
% Attested in PSG (1996:211) as a typesetter's error for a normal
1228
% glottal stop. The error is said to appear in the second edition
1231
% Why do I have to make a symbol like this? Sigh...
1233
cmchar "Turned glottal stop (PSG 1996:211)";
1234
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,0);
1235
italcorr .8asc_height#*slant-.5u#;
1237
pickup tiny.nib; pos7(stem,0); top y7=h; x7=.53w;
1238
pos2(vair,270); pos3(curve,180);
1239
pos4(vair,90); pos5(stem,0); pos6(stem,180);
1240
x2=x5=x6=x7; x4=x5r;
1241
lft x3r=hround u; top y6=h-.3x_height;
1242
bot y2r=-oo; y3=.5[y2,y4]; y4r=.5h; y5=y4l;
1243
{{interim superness:=more_super;
1244
filldraw stroke pulled_super_arc.e(2,3)(superpull)
1245
& z3e{up}...{(10,1)}z4e;
1246
filldraw stroke z5e--z7e\\}}; % arc and stem
1247
if serifs: pos1(hair,0); pos0(flare,0);
1248
rt x1r=hround(w-u); y1=.3[y3,y2]; bulb(2,1,0); % bulb
1249
dish_serif(7,5,e,1/3,jut,f,1/3,jut); %serif
1250
else: pos1(vround 5/7[vair,flare],290);
1251
rt x1r=hround(w-u); bot y1r=vround .9[y6,top y2r];
1252
filldraw stroke term.e(2,1,right,1,4); fi % terminal
1253
penlabels(0,1,2,3,4,5,6,7); endchar;
1255
cmchar "Pipe (a variety with no descender)";
1256
beginchar(incr ipacode,CT(5u#,5.56u#),asc_height#,0);
1257
italcorr asc_height#*slant+.5rule_thickness#-2u#;
1259
numeric thickness; thickness=hround.4[hair,stem];
1260
pickup tiny.nib; pos1(thickness,0); pos2(thickness,0);
1261
lft x1l = lft x2l = hround(.5w-.5thickness);
1262
top y1=h+o; bot y2=-d-o;
1263
filldraw stroke z1e--z2e;
1264
penlabels(1,2); endchar;
1266
cmchar "Double pipe (a variety with no descender)";
1267
beginchar(incr ipacode,CT(8u#,8.88u#),asc_height#,0);
1268
italcorr asc_height#*slant+.5rule_thickness#-2u#;
1270
numeric thickness; thickness=hround(.4[hair,stem]-2stem_corr);
1271
pickup tiny.nib; pos1(thickness,0); pos2(thickness,0);
1272
pos3(thickness,0); pos4(thickness,0);
1273
x1=x2; x3=x4=w-x1; lft x1l = hround((w-3.2u-thickness)/2);
1274
top y1=top y3=h+o; bot y2=bot y4=-d-o;
1275
filldraw stroke z1e--z2e; filldraw stroke z3e--z4e;
1276
penlabels(1,2,3,4); endchar;
1278
cmchar "Double-barred pipe (a variety with no descender)";
1279
beginchar(incr ipacode,10u#,asc_height#,0);
1280
italcorr asc_height#*slant+.5rule_thickness#-1.5u#;
1282
numeric thickness[]; thickness1=hround.4[hair,stem];
1283
pickup tiny.nib; pos1(thickness1,0); pos2(thickness1,0);
1284
lft x1l = lft x2l = hround(.5w-.5thickness1);
1285
top y1=h+o; bot y2=-d-o;
1286
filldraw stroke z1e--z2e;
1287
thickness2=vround .3[vair,flare];
1288
pos3(thickness2,90); pos4(thickness2,90);
1289
pos5(thickness2,90); pos6(thickness2,90);
1290
lft x3l = lft x5l = hround 1u;
1291
rt x4l = rt x6l = hround(w-1u);
1292
top y3r = top y4r = h-d-bot y5;
1293
bot y5l = bot y6l = vround(1/3(h+d)-d-.5thickness2);
1294
filldraw stroke z3e--z4e;
1295
filldraw stroke z5e--z6e;
1296
penlabels(1,2,3,4,5,6); endchar;
1298
cmchar "L-Fish-hook R ligature";
1299
numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
1300
define_whole_blacker_pixels(r_flare);
1301
beginchar(incr ipacode,CT(if serifs:max(7u#,5.5u#+r_flare#) else:6.5u# fi,6.66u#),
1303
italcorr x_height#*slant if not serifs: +.25u# fi;
1304
adjust_fit(serif_fit#,0);
1305
pickup fine.nib; top y4r=x_height+oo;
1306
if serifs: pos4(vair,90); pos5(hair,0); x4=.5[x6,.5w];
1307
rt x5r=hround(w-if Times_Compat: .25u else: .5u fi +.5);
1308
y5+.8r_flare=.9[bar_height,x_height]+oo;
1309
pos6(r_flare,0); bulb(4,5,6); % bulb
1310
else: pos4(r_flare,90); rt x4=hround(w-.25u); fi
1311
pos0'(hround(stem-3stem_corr),180);
1312
rt x0'l=hround(side_gap-.5stem')+stem'; top y0'=bar_height+1.8u;
1313
filldraw stroke z0'e{up}...{right}z4e; % arc
1314
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
1315
x1=x2=x0'; top y1=h; bot y2=0;
1316
filldraw stroke z1e--z2e; % stem
1317
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper serif
1318
dish_serif(2,1,b,1/3,jut,c,1/3,1.25jut); fi % lower serif
1319
penlabels(1,2,0',4,5,6); endchar;
1323
cmchar "A variety of thorn (1)";
1324
beginchar(incr ipacode,10u#+serif_fit#,asc_height#,desc_depth#);
1325
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
1326
adjust_fit(serif_fit#,0);
1327
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
1328
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
1329
lft x1l=hround(side_gap-.5stem'); top y1=h;
1330
numeric edge; edge=rt x2r;
1331
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
1332
pos4(vair',90); pos5(curve,0); pos6(vair,-90);
1333
rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
1334
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
1335
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
1337
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
1338
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
1339
&z5e{down}...{5(x6-x5),y6-y5}z6e; % bowl
1340
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
1341
pickup tiny.nib; bot y2=-d;
1342
filldraw stroke z1e--z0'e--z0e--z2e; % stem
1343
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
1344
z7'=z2; x8l=x7'l; bot y8=0;
1345
filldraw stroke z7'e--z8e; % point
1346
penlabels(0,1,2,3,4,5,6,8); endchar;
1348
cmchar "A variety of thorn (2)";
1349
beginchar(incr ipacode,10u#+serif_fit#,asc_height#,desc_depth#);
1350
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
1351
adjust_fit(serif_fit#,0);
1352
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
1353
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
1354
lft x1l=hround(side_gap-.5stem'); top y1=h;
1355
numeric edge; edge=rt x2r;
1356
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
1357
pos4(vair',90); pos5(curve,0); pos6(vair,-90);
1358
rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
1359
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
1360
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
1362
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
1363
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
1364
&z5e{down}...{5(x6-x5),y6-y5}z6e; % bowl
1365
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
1366
pickup tiny.nib; bot y2=if serifs: -.7d; else: -d; fi
1367
filldraw stroke z1e--z0'e--z0e--z2e; % stem
1368
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
1369
z7'=z2; x8l=x7'l; bot y8=0;
1370
filldraw stroke z7'e--z8e; % point
1371
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif
1372
pickup tiny.nib; pos10(stem,0); pos11(vair,-90);
1373
z10=z2; lft x11l=.5u; y11l=-d-oo;
1374
varm(10,11,b,.8beak_darkness,-1.5beak_jut); fi
1375
penlabels(0,1,2,3,4,5,6,8,10,11); endchar;
1377
cmchar "A variety of thorn (3)";
1378
beginchar(incr ipacode,10u#+serif_fit#,asc_height#,desc_depth#);
1379
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
1380
adjust_fit(serif_fit#,0);
1381
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
1382
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
1383
lft x1l=hround(side_gap-.5stem'); top y1=h;
1384
numeric edge; edge=rt x2r;
1385
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
1386
pos4(vair',90); pos5(curve,0); pos6(vair,-90);
1387
rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
1388
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
1389
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
1391
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
1392
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
1393
&z5e{down}...{5(x6-x5),y6-y5}z6e; % bowl
1394
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
1395
pickup tiny.nib; bot y2=-d;
1396
filldraw stroke z1e--z0'e--z0e--z2e; % stem
1397
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
1398
z7'=z2; x8l=x7'l; bot y8=0;
1399
filldraw stroke z7'e--z8e; % point
1400
if serifs: dish_serif(1,2,a,1/3,jut,d,1/3,jut); % upper serif
1401
dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif
1402
penlabels(0,1,2,3,4,5,6,8); endchar;
1404
cmchar "A variety of thorn (4)";
1405
beginchar(incr ipacode,10u#+serif_fit#,asc_height#,desc_depth#);
1406
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
1407
adjust_fit(serif_fit#,0);
1408
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
1409
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
1410
lft x1l=hround(side_gap-.5stem'); top y1=h;
1411
numeric edge; edge=rt x2r;
1412
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
1413
pos4(vair',90); pos5(curve,0); pos6(vair,-90);
1414
rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
1415
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
1416
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
1418
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
1419
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
1420
&z5e{down}...{5(x6-x5),y6-y5}z6e; % bowl
1421
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
1422
pickup tiny.nib; bot y2=0;
1423
filldraw stroke z1e--z0'e--z0e--z2e; % stem
1424
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
1425
z7'=z2; x8l=x7'l; bot y8=0;
1426
filldraw stroke z7'e--z8e; % point
1427
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi % upper serif
1428
left_tail(2,9,10,11,stem,hround(-.75u));
1429
penlabels(0,1,2,3,4,5,6,8,9,10,11); endchar;
1431
cmchar "A variety of glottal stop (1)";
1432
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,0);
1433
italcorr .8asc_height#*slant;
1435
pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
1436
lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8;
1438
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
1439
pickup fine.nib; pos2(vair,90); pos3(curve,0);
1440
pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0);
1441
x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=0;
1442
top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
1443
{{interim superness:=more_super;
1444
filldraw stroke pulled_super_arc.e(2,3)(superpull)
1445
& subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}}; % arc and stem
1446
if serifs: pos1(hair,180); pos0(flare,180);
1447
lft x1r=hround u; y1=y3; bulb(2,1,0); % bulb
1448
else: pos1(Vround 5/7[vair,flare],110);
1449
lft x1r=hround u; top y1r=vround .9[y6,top y2r];
1450
filldraw stroke term.e(2,1,left,1,4); fi % terminal
1451
penlabels(0,1,2,3,4,5,6,7,8); endchar;
1453
cmchar "A variety of glottal stop (2)";
1454
beginchar(incr ipacode,CT(9u#,10u#),asc_height#,0);
1455
italcorr .8asc_height#*slant-.5u#;
1457
pickup tiny.nib; pos7(stem,0); bot y7=0; x7=.47w;
1458
pos2(vair,90); pos3(curve,0);
1459
pos4(vair,-90); pos5(stem,0); pos6(stem,0);
1460
x2=x5=x6=x7; x4=x5l;
1461
rt x3r=hround(w-u); y6=.67[y3,y7];
1462
top y2r=h+oo; y3=.5[y2,y4]; y4r=.5y2; y5=y4l;
1463
{{interim superness:=more_super;
1464
filldraw stroke pulled_super_arc.e(2,3)(superpull)
1465
& z3e{down}..{down}z6e--z7e\\}}; % arc and stem
1466
if serifs: pos1(hair,180); pos0(flare,180);
1467
lft x1r=hround u; y1=.3[y3,y2]; bulb(2,1,0); % bulb
1468
dish_serif(7,5,e,1/3,jut,f,1/3,jut); %serif
1469
else: pickup fine.nib; pos2'(vair,90); z2'=z2;
1470
pos1(vround 5/7[vair,flare],110);
1471
lft x1r=hround u; top y1r=vround .9[y6,top y2r];
1472
filldraw stroke term.e(2',1,left,1,4); fi % terminal
1473
penlabels(0,1,2,3,4,5,6,7); endchar;
1475
cmchar "A variety of glottal stop (3)";
1476
beginchar(incr ipacode,CT(8u#,8.88u#),asc_height#,0);
1477
italcorr .8asc_height#*slant-.5u#;
1481
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
1482
pos7(bot_width,0); bot y7=0; x7=.4w;
1483
pos2(vair,90); pos3(curve,-60);
1484
pos4(min(curve,3vair),-90); pos5(bot_width,0); pos6(bot_width,0);
1485
x2=x5=x6=x7; x4=x5l;
1486
rt x3r=hround(w-u); bot y6=.3x_height;
1487
top y2r=h+oo; y3=.6[y2,y4]; y4r=.4y2; y5=y4r;
1488
{{interim superness:=more_super;
1489
filldraw stroke pulled_super_arc.e(2,3)(superpull)
1491
filldraw stroke z5e--z7e\\}}; % arc and stem
1492
if serifs: pos1(hair,180); pos0(flare,180);
1493
lft x1r=hround 2u; y1=.8[y3,y2]; bulb(2,1,0); % bulb
1494
% dish_serif(7,5,e,1/3,jut,f,1/3,jut); %serif
1495
else: pickup fine.nib; pos2'(vair,90); z2'=z2;
1496
pos1(vround 5/7[vair,flare],110);
1497
lft x1r=hround 1.5u; top y1r=vround .9[y6,top y2r];
1498
filldraw stroke term.e(2',1,left,1,4); fi % terminal
1499
penlabels(0,1,2,3,4,5,6,7); endchar;
1507
def sc_hair = hair enddef;
1508
def sc_stem = stem enddef;
1509
def sc_curve = curve enddef;
1510
def sc_jut = cap_jut enddef;
1511
def sc_bar = cap_bar enddef;
1512
def sc_band = cap_band enddef;
1514
% romanu.mf -> tipasc.mf conversion:
1516
% x_height -> .626x_height
1517
% bar_height -> .632bar_height
1518
% cap_height -> x_height
1519
% comma_depth -> 44/70comma_depth
1520
% cap_hair -> sc_hair
1521
% cap_stem -> sc_stem
1522
% cap_curve -> sc_curve
1526
% cap_band -> sc_band
1528
cmchar "Inverted small capital A";
1529
beginchar(incr ipacode,13u#,x_height#,0);
1530
italcorr x_height#*slant-.5u#;
1531
adjust_fit(cap_serif_fit#,cap_serif_fit#);
1532
numeric left_stem,right_stem,outer_jut,alpha;
1533
right_stem=sc_stem-stem_corr;
1534
left_stem=min(sc_hair if hefty: -3stem_corr fi,right_stem);
1535
outer_jut=.8sc_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=h;
1536
x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=-apex_o-apex_oo;
1537
alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
1538
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
1539
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
1540
z0=whatever[z1r,z2r]=whatever[z3l,z4l];
1541
if y0>cap_notch_cut: y0:=cap_notch_cut;
1542
fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
1543
--diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
1544
...{down}z0+.5left--cycle; % left and right diagonals
1545
else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
1546
--diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
1547
penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
1548
penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
1549
if hefty: y5l else: y5 fi =h-5/12(h-y0);
1550
y5r-y5l=y6r-y6l=sc_band; penstroke z5e--z6e; % bar line
1551
if serifs: numeric inner_jut; pickup tiny.nib;
1552
prime_points_inside(1,2); prime_points_inside(4,3);
1553
if rt x1'r+sc_jut+.5u+1<=lft x4'l-sc_jut: inner_jut=sc_jut;
1554
else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
1555
dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark); % left serif
1556
dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi % right serif
1557
penlabels(0,1,2,3,4,5,6); endchar;
1559
cmchar "Small capital A-O Ligature";
1560
beginchar(incr ipacode,18u#,x_height#,0);
1561
italcorr .7x_height#*slant-.5u#;
1562
adjust_fit(cap_serif_fit#,0);
1563
numeric left_stem,mid_stem,outer_jut,alpha;
1564
mid_stem=max(tiny.breadth,hround .9[mfudged.hair,mfudged.sc_stem]);
1565
pickup tiny.nib; pos1(mid_stem,0); pos2(mid_stem,0);
1566
lft x1l=lft x2l=hround(if monospace or hefty:.55 else:.5 fi\\w-.75u);
1568
filldraw stroke z1e--z2e; % stem
1569
pickup crisp.nib; pos3(slab,90); pos4(mfudged.hair,0);
1570
top y3r=h; x3=x1; pos5(sc_bar,-90); x5=x1;
1571
top y5l=vround(if hefty:.52 else:.48 fi\\[y2,y1]+.5sc_bar);
1572
pos0(sc_bar,90); z0=z5;
1573
pos8(slab if not serifs:+2stem_corr fi,-90);
1575
left_stem=if monospace:fudged.hair else: sc_hair fi if hefty: -3stem_corr fi;
1576
outer_jut=.8sc_jut; x11l=l+letter_fit+outer_jut+.5u; y11=0;
1577
x12=x1l-apex_corr-if monospace:2 fi\\u; y12=h;
1578
alpha=diag_ratio(1,.5left_stem,y12-y11,x12-x11l);
1579
penpos11(alpha*left_stem,0); penpos12(alpha*left_stem,0);
1580
fill diag_end(12l,11l,1,1,11r,12r)
1581
--diag_end(11r,12r,1,1,12l,11l)--cycle; % diagonal
1582
y10=h-slab; z10=whatever[z11,z12];
1583
fill z10--(x1,y10)--(x1,h)--z12--cycle; % link
1584
penpos13(whatever,angle(z2-z1)); z13=whatever[z11,z12];
1585
penpos14(sc_band,90); x14=x0; y13l=y14l; y13r=y14r;
1586
if hefty: y14r=.4h; else: y14=y0; fi
1587
penstroke z13e--z14e; % bar line
1588
penpos21(vair,90); penpos23(vair,-90);
1589
if monospace: penpos22(fudged.sc_stem,0);
1590
interim superness:=sqrt superness; % make |"O"|, not |"0"|
1591
else: penpos22(hround(sc_curve-stem_corr),0); fi
1592
x21=x23=rt x1r+2u; y21r=h+o; y23r=-o; y22=.5h-vair_corr; x22r=hround(w-u);
1593
rt x24=rt x25=tiny.rt x1r; y24=2/3h; y25=1/3h; y22l:=.52h;
1594
penstroke super_arc.e(21,22) & super_arc.e(22,23); % left half of bowl
1595
fill z23r{left}..{left}(x2,0)--(x1,h){right}..{right}z21r
1596
--z21l{left}...{z24-z21l}(.82[x21l,x24],.82[y24,y21l])
1597
...z24---z25...{z23l-z25}(.82[x23l,x25],.82[y25,y23l])
1598
...{right}z23l--cycle; % right half of bowl
1599
if serifs: numeric inner_jut; pickup tiny.nib;
1600
prime_points_inside(11,12);
1601
if rt x11'r+sc_jut+.5u+1<=lft x2l-.75sc_jut: inner_jut=sc_jut;
1602
else: rt x11'r+inner_jut+.5u+1=lft x2l-.75inner_jut; fi
1603
dish_serif(11',12,i,1/2,outer_jut,j,.6,inner_jut)(dark); % lower left serif
1604
serif(1,2,a,1/3,-(sc_jut+x1l-x12)); % upper serif
1605
serif(2,1,c,1/3,-.75inner_jut); fi % lower middle serif
1606
penlabels(0,1,2,3,5,8,10,11,12,13,14,21,22,23,24,25); endchar;
1608
cmchar "Small capital Greek delta";
1609
beginchar(incr ipacode,15u#,x_height#,0);
1611
numeric left_stem,alpha;
1612
left_stem=sc_hair if hefty: -3stem_corr fi;
1613
x1l=w-x4r=.75u; y1=y4=0;
1614
x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo;
1615
alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
1616
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
1617
penpos3(alpha*sc_stem,0); penpos4(alpha*sc_stem,0);
1618
fill diag_end(2l,1l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)--cycle; % triangle
1619
z0=whatever[z1r,z2r]=whatever[z3l,z4l];
1620
y5=y6=cap_vstem; z5=whatever[z1r,z2r]; z6=whatever[z3l,z4l];
1621
if y0<h-cap_notch_cut: y0:=h-cap_notch_cut;
1622
unfill z0+.5right{down}...{z4-z3}z6--z5{z2-z1}
1623
...{up}z0+.5left--cycle; % counter
1624
else: unfill z0--z5--z6--cycle; fi % counter
1625
penlabels(0,1,2,3,4,5,6); endchar;
1627
cmchar "Small capital F";
1628
beginchar(incr ipacode,11.5u#-width_adj#,x_height#,0);
1629
italcorr x_height#*slant-beak_jut#-.25u#;
1630
adjust_fit(cap_serif_fit#,0);
1631
h:=vround(h-stem_corr);
1632
pickup tiny.nib; pos1(sc_stem,0); pos2(sc_stem,0);
1633
lft x1l=lft x2l=hround max(2u,3u-.5sc_stem); top y1=h; bot y2=0;
1634
filldraw stroke z1e--z2e; % stem
1635
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
1636
top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps;
1637
arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak
1638
pos5(sc_bar,-90); pos6(hair,0);
1639
top y5l=vround(.5[y2,y1]+.5sc_bar); x5=x1;
1640
pos0(sc_bar,90); pos7(hair,0);
1641
z0=z5; x6=x7; y6-y5l=y0l-y7;
1642
if serifs: rt x6r=hround(w-4u+.5hair); y6=good.y(y5l+.6beak)+eps;
1643
rt x9r=hround(w-.5u);
1644
else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
1645
arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif
1646
if serifs: nodish_serif(1,2,a,1/3,sc_jut,b,1/3,.5sc_jut); % upper serif
1647
dish_serif(2,1,c,1/3,sc_jut,d,1/3,1.25sc_jut); fi % lower serif
1648
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
1650
cmchar "Small capital K";
1651
beginchar(incr ipacode,13.5u#,x_height#,0);
1652
italcorr x_height#*slant-.5u#;
1653
adjust_fit(cap_serif_fit#,cap_serif_fit#);
1654
numeric right_jut,stem[],alpha[];
1655
if serifs: right_jut=.6sc_jut;
1656
else: right_jut=.4tiny; fi
1657
pickup tiny.nib; pos1(fudged.sc_stem,0); pos2(fudged.sc_stem,0);
1658
lft x1l=lft x2l=hround max(2u,3u-.5fudged.sc_stem); top y1=h; bot y2=0;
1659
filldraw stroke z1e--z2e; % stem
1660
stem2=max(tiny.breadth,fudged.sc_stem-3stem_corr);
1661
stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi);
1662
top y3=h; rt x3r=hround(r-letter_fit-u-right_jut);
1663
bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut);
1665
alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4);
1666
penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90);
1667
alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1);
1668
penpos6(alpha2*(stem2-tiny),0);
1669
forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4);
1670
z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor
1672
z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4);
1673
% we have also z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4);
1674
z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6);
1675
z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6);
1676
fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal
1677
fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal
1678
if serifs: numeric inner_jut;
1679
if rt x2r+sc_jut+.5u+1<=lft x6l-sc_jut: inner_jut=sc_jut;
1680
else: rt x2r+sc_jut+.5u+1=lft x6l-inner_jut; fi
1681
dish_serif(1,2,a,1/3,sc_jut,b,1/3,sc_jut); % upper stem serif
1682
dish_serif(2,1,c,1/3,sc_jut,d,1/3,sc_jut); % lower stem serif
1683
dish_serif(3,4,e,2/3,1.2sc_jut,f,1/2,right_jut)(dark); % upper diagonal serif
1684
dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark);fi% lower diagonal serif
1685
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar;
1687
cmchar "Turned small capital K";
1688
beginchar(incr ipacode,13.5u#,x_height#,0);
1689
italcorr x_height#*slant-.5u#;
1690
adjust_fit(cap_serif_fit#,cap_serif_fit#);
1691
numeric right_jut,stem[],alpha[];
1692
if serifs: right_jut=.6sc_jut;
1693
else: right_jut=.4tiny; fi
1694
pickup tiny.nib; pos1(fudged.sc_stem,0); pos2(fudged.sc_stem,0);
1695
rt x1r=rt x2r=hround max(w-2u,w-(3u-.5fudged.sc_stem)); bot y1=0; top y2=h;
1696
filldraw stroke z1e--z2e; % stem
1697
stem2=max(tiny.breadth,fudged.sc_stem-3stem_corr);
1698
stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi);
1699
bot y3=0; lft x3l=hround(l+letter_fit+u+right_jut);
1700
top y6=h; lft x6l=hround(l+letter_fit+.75u+right_jut);
1702
alpha1=diag_ratio(1,.5(stem1-tiny),y4-y3,x4-x3l);
1703
penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90);
1704
alpha2=diag_ratio(1,.5(stem2-tiny),y6-y1,x1-x6l);
1705
penpos6(alpha2*(stem2-tiny),0);
1706
forsuffixes $=l,r: y3'$=0; y6'$=h; z4$=z3'$+whatever*(z3-z4);
1707
z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor
1709
z3'l=z3l+penoffset z3-z4 of currentpen+whatever*(z3-z4);
1710
% we have also z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4);
1711
z6'l=z6l+penoffset z1-z6 of currentpen+whatever*(z1-z6);
1712
z6'r=z6r+penoffset z6-z1 of currentpen+whatever*(z1-z6);
1713
fill z4l--diag_end(4l,3'l,1,.5,3'r,4r)--z4r--cycle; % upper diagonal
1714
fill z5r--diag_end(5r,6'r,.5,1,6'l,5l)--z5l--cycle; % lower diagonal
1715
if serifs: numeric inner_jut;
1716
if lft x2l-sc_jut-.5u+1>=rt x6r+sc_jut: inner_jut=sc_jut;
1717
else: lft x2l-sc_jut-.5u-1=rt x6r+inner_jut; fi
1718
dish_serif(1,2,a,1/3,sc_jut,b,1/3,sc_jut); % upper stem serif
1719
dish_serif(2,1,c,1/3,sc_jut,d,1/3,sc_jut); % lower stem serif
1720
dish_serif(3,4,e,1/2,right_jut,f,2/3,1.2sc_jut)(dark); % upper diagonal serif
1721
dish_serif(6,5,g,1/3,right_jut,h,1/2,inner_jut)(dark);fi% lower diagonal serif
1722
math_fit(0,.5ic#); penlabels(1,2,3,3',4,5,6,6'); endchar;
1724
cmchar "Reversed small capital L";
1725
beginchar(incr ipacode,11u#-width_adj#,x_height#,0);
1726
adjust_fit(0, cap_serif_fit#);
1727
italcorr x_height#*slant-1u#;
1728
pickup tiny.nib; pos1(sc_stem,0); pos2(sc_stem,0);
1729
rt x1r=rt x2r=hround min(w-2u,w-(3u-.5sc_stem)); top y1=h; bot y2=0;
1730
filldraw stroke z1e--z2e; % stem
1731
pickup crisp.nib; pos3(slab,-90); pos4(hair,180);
1732
bot y3r=0; x3=x2; y4=y3l+beak+eps; lft x4r=hround .75u;
1733
arm(3,4,e,1.2beak_darkness,-beak_jut); % lower arm and beak
1734
if serifs: dish_serif(1,2,b,1/3,1.25sc_jut,a,1/3,sc_jut); % upper serif
1735
nodish_serif(2,1,d,1/3,.5sc_jut,c,1/3,sc_jut); fi % lower serif
1736
math_fit(0,u#); penlabels(1,2,3,4); endchar;
1738
cmchar "Small capital M";
1739
beginchar(incr ipacode,16u#+width_adj#,x_height#,0);
1740
italcorr x_height#*slant-cap_serif_fit#+sc_jut#-2.5u#+min(.5sc_stem#,u#);
1741
adjust_fit(cap_serif_fit#,cap_serif_fit#);
1742
numeric stem[]; % thicknesses of the four strokes
1743
stem1=hround(fudged.hair+stem_corr);
1744
stem2=hround(fudged.sc_stem-4stem_corr);
1745
stem3=hround(fudged.hair-stem_corr);
1746
stem4=hround(fudged.sc_stem-3stem_corr);
1747
if stem4<stem1: stem4:=stem1; fi
1748
pickup tiny.nib; pos1(stem1,0); pos2(stem1,0);
1749
pos3(stem4,0); pos4(stem4,0);
1750
x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4);
1751
top y1=top y3=h; bot y2=bot y4=0;
1752
filldraw stroke z1e--z2e; % left stem
1753
filldraw stroke z3e--z4e; % right stem
1754
penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0);
1755
x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7;
1756
if hefty: y6=if monospace: vround 1/3h else: o fi;
1757
numeric upper_notch,lower_notch;
1758
upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut;
1759
x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r];
1760
z0=whatever[z5r,z6r]=whatever[z7l,z8l];
1762
if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi
1763
{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7}
1764
if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi
1765
..z8r--diag_out(8r,1,8l,7l){z7-z8}
1766
if y0<=lower_notch: ..{z7-z8}z0{z5-z6}..
1767
else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi
1768
{z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals
1769
else: y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l];
1770
fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7}
1771
..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6}
1772
..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals
1773
if serifs: serif(1,2,a,1/3,-sc_jut); % upper left serif
1774
dish_serif(2,1,b,1/2,sc_jut,c,1/2,sc_jut)(dark); % lower left serif
1775
serif(3,4,d,1/3,sc_jut); % upper right serif
1776
dish_serif(4,3,e,1/3,sc_jut,f,1/3,sc_jut); fi % lower right serif
1777
math_fit(0,max(.5ic#-.5u#,0));
1778
penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar;
1780
cmchar "Small capital P";
1781
beginchar(incr ipacode,12u#,x_height#,0);
1782
italcorr .75x_height#*slant-.5u#;
1783
adjust_fit(cap_serif_fit#,0);
1784
pickup tiny.nib; penpos1(sc_stem'-tiny,0); penpos2(sc_stem-tiny,0);
1785
pos0(sc_stem',0); pos0'(sc_stem,0);
1786
lft x1l=hround max(2u,3u-.5sc_stem'); top y1=h; bot y2=0;
1787
x1l=x2l=x0l=x0'l; y0=y0'=y7;
1788
penpos3(sc_band,90); penpos4(sc_band,90);
1789
penpos5(sc_curve if hefty:-3stem_corr fi,0);
1790
penpos6(.5[vair,sc_band],-90); penpos7(.5[vair,sc_band],-90);
1791
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
1792
x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u);
1793
x4l:=x6l:=x4-.25sc_curve;
1794
filldraw stroke z1e--z0e--z0'e--z2e; % stem
1795
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe
1796
if serifs: nodish_serif(1,0,a,1/3,sc_jut,b,1/3,.5sc_jut); % upper serif
1797
dish_serif(2,0',c,1/3,sc_jut,d,1/3,sc_jut); fi % lower serif
1798
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); endchar;
1800
cmchar "Small capital Q";
1801
beginchar(incr ipacode,14u#-width_adj#,x_height#,44/70comma_depth#);
1802
italcorr .7x_height#*slant-.5u#;
1804
numeric light_curve; light_curve=sc_curve-hround stem_corr;
1805
penpos1(vair',90); penpos3(vair',-90);
1806
penpos2(light_curve,180); penpos4(light_curve,0);
1807
if monospace: x2r=hround 1.5u;
1808
interim superness:=sqrt superness; % make |"Q"| like |"O"|
1809
else: x2r=hround u; fi
1810
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o;
1811
penstroke pulled_super_arc.e(1,2)(.5superpull)
1812
& pulled_super_arc.e(2,3)(.5superpull)
1813
& pulled_super_arc.e(3,4)(.5superpull)
1814
& pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl
1816
if hefty: penpos5(1.2(.5[sc_bar,light_curve]),0); penpos6(1.2light_curve,0);
1817
x5=.5w; x6r=hround(w-1.5u);
1818
y5=vround .28h; y6=-d;
1819
fill diag_end(6r,5r,.25,1,5l,6l)--diag_end(5l,6l,.5,1,6r,5r)--cycle; % tail
1820
else: pos3'(vair,270); pos5(vair,180); pos6(vair,90);
1821
pos7(sc_curve,85); penpos8(eps,180);
1822
z3'=z3; x6=x3; top y6r=vround(.2h+.5vair);
1823
lft x5r=hround(.5w-1.25u-.5vair); y5=.5[y3,y6];
1824
bot y7l=-d; x7l=2/3[x6,x8]; y8=0; rt x8=hround(x4r+.1u);
1825
filldraw stroke z3'e{left}...z5e{up}...z6e{right}
1826
..z7e{right}...z8e{up}; fi % tail
1827
math_fit(-.3x_height#*slant-.5u#,ic#); penlabels(1,2,3,4,5,6,7); endchar;
1829
cmchar "Reversed small capital R";
1830
beginchar(incr ipacode,if serifs: 12u#+.5max(2u#,sc_curve#)
1831
else:12.5u#-.5width_adj# fi,x_height#,0);
1832
italcorr x_height#*slant-1u#;
1833
adjust_fit(0, cap_serif_fit#);
1834
pickup tiny.nib; pos1(sc_stem',0); pos2(sc_stem',0);
1835
rt x1r=rt x2r=hround min(w-2u,w-(3u-.5sc_stem')); top y1=h; bot y2=0;
1836
filldraw stroke z1e--z2e; % stem
1837
penpos3(sc_band,90); penpos4(sc_band,90);
1838
penpos5(sc_curve if hefty:-3stem_corr fi,180);
1839
penpos6(vair,-90); penpos7(vair,-90);
1840
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
1841
x7=x2; y7l=vround(.5h+.5vair); x4=x6;
1842
if serifs: x4=.5w+.5u; x5r=hround 2.25u;
1843
else: x4=.5w-.5u; x5r=hround u; fi
1844
x4l:=x6l:=x4+.125sc_curve;
1845
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe
1846
if serifs: pos6'(vair,-90); pos0(sc_stem,0);
1847
pos8(sc_curve,0); pos9(vair,-90); pos10(hair,180);
1848
z6'=z6; rt x0r=rt x8r=hround(x5+2/3u+.5sc_curve);
1849
y8=1/3[y2,y7]; y0=3/5[y2,y7]; x9=.5[x8l,x10r];
1850
bot y9r=-o; lft x10r=hround .05u; y10=1/4[y2,y7];
1851
filldraw stroke z6'e{left}..z0e---z8e....z9e{left}..z10e{up}; % tail
1852
nodish_serif(1,2,a,1/3,.5sc_jut,b,1/3,sc_jut); % upper serif
1853
dish_serif(2,1,c,1/3,sc_jut,d,1/3,sc_jut); % lower serif
1854
else: penpos8(sc_stem-2stem_corr,180); penpos9(sc_stem,180);
1855
x8=x6-.5u; y8=y6; x9r=hround .5u; y9=0;
1856
fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi % tail
1857
math_fit(0,.75ic#); penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
1859
cmchar "Turned small capital U";
1860
beginchar(incr ipacode,13u#+.5width_adj#,x_height#,0);
1861
italcorr .75x_height#*slant-cap_serif_fit#+sc_jut#-2.5u#+min(.5sc_stem#,u#);
1862
if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#)
1863
else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi;
1864
pickup tiny.nib; pos1(sc_stem,0); pos2(sc_stem,0);
1865
pos2'(sc_stem,0); z2'=z2;
1866
pos3(sc_band,90); pos4(sc_hair,180); pos5(sc_hair,180);
1867
x1=x2; x3=.5[x1,x5]; x4=x5; x5r=w-x1r;
1868
bot y1=bot y5=0; y2=y4=2/3h; top y3r=h+o;
1869
rt x1r=hround min(w-2u,w-(3u-.5sc_stem));
1870
filldraw stroke z1e--z2e; % left stem
1871
filldraw stroke pulled_arc.e(2',3)
1872
& pulled_arc.e(3,4)&z4e--z5e; % arc and right stem
1873
if serifs: dish_serif(1,2,a,1/3,sc_jut,b,1/3,sc_jut); % left serif
1874
dish_serif(5,4,c,1/2,sc_jut,d,1/2,sc_jut)(dark); fi % right serif
1875
math_fit(-cap_serif_fit#-.3x_height#*slant-min(x_height#*slant,u#),
1876
max(.5ic#-.5u#,0)); penlabels(1,2,3,4,5); endchar;
1878
restore_normal_setup;
1884
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1886
% This accent is now realized as macro.
1887
cmchar "Macron Acute accent";
1888
numeric macron_breadth#; macron_breadth#=.2[vair#,stem#];
1889
beginchar(oct"040",9u#,asc_height#,0);
1890
italcorr h#*slant-.75u#;
1892
numeric macron_breadth; macron_breadth:=Vround .2[vair,stem];
1893
pickup if serifs: crisp.nib else: fine.nib fi;
1894
pos1(macron_breadth,90); pos2(macron_breadth,90);
1895
top y1r=top y2r=vround(.3[x_height,asc_height]+macron_breadth)+o;
1896
lft x1=w-rt x2=hround 1.25u;
1897
filldraw stroke z1e--z2e; % bar
1898
if serifs: pickup crisp.nib; x3+.5stem=hround(w-2u); x4=2/3[x3,w-x3];
1899
y3=h+o+eps; pos4(hair,0); y4r=y1l;
1900
numeric theta; theta=angle(z4-z3)+90;
1902
filldraw circ_stroke z3e--z4e; % diagonal
1903
else: pickup fine.nib; pos3(stem,0); pos4(vair,0);
1904
rt x3r=hround(w-2u); lft x4l=hround(.5w-.75u-.5vair);
1905
top y3=h+o; y4r=y1l;
1906
filldraw stroke z3e--z4e; fi % diagonal
1907
penlabels(1,2,3,4); endchar;