| 1 |
%% This file is public domain. |
| 2 |
%% Originally written 1990, Alan Hoenig. |
| 3 |
%% Notice added by Clea F. Rees 2010/12/13 following correspondence between Alan Hoenig and Karl Berry. |
| 4 |
|
| 5 |
%% Program files for CASUAL Computer Duerer fonts. |
| 6 |
%% |
| 7 |
join_radius:=.1pt; |
| 8 |
pair xeps, yeps; xeps=(eps,0); yeps=(0,eps); |
| 9 |
|
| 10 |
numeric P_width#; P_width#=cap_jut#+3thick#+1/4side#-1/2thin#; |
| 11 |
define_pixels(P_width); |
| 12 |
numeric t[]; % tensions |
| 13 |
t.l=1.25; t.r=1; |
| 14 |
|
| 15 |
numeric axis; axis=1; |
| 16 |
% H.\ Zapf would not put the axis as oblique as did |
| 17 |
% D\"urer. This quantity measures this obliqueness. |
| 18 |
% $0\leq axix\leq1$; $axis=1$ corresponds to D\"urer |
| 19 |
% $axis=2$ corresponds to vertical axis. |
| 20 |
numeric tail_corr; tail_corr=1/8; |
| 21 |
|
| 22 |
cmchar "The letter A (casual)"; |
| 23 |
beginchar("A", 2u#+2cap_jut#+.8side#, cap_height#, 0); |
| 24 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); |
| 25 |
top y3=top y2=h+apex_o; |
| 26 |
numeric alpha[]; alpha1=((h+cap_jut)++(w/2))/(h+cap_jut); |
| 27 |
penpos1(alpha1*thin,0); penpos2(alpha1*thin,0); |
| 28 |
penpos3(alpha1*thick,0); penpos4(alpha1*thick,0); |
| 29 |
lft x1l=cap_jut+.5u; rt x4r=w-x1l; bot y1=bot y4=0; |
| 30 |
x3r=x2l+apex_corr; hround(w/2)=.5[x2,x3]; |
| 31 |
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; |
| 32 |
pos0'(.6thick,0);z0'r=whatever[z4r,z3r]; z0'l=whatever[z1l,z2l]; |
| 33 |
fill z0--diag_end(0,4l,1,1,4r,3r)--z0'r--z0'l--diag_end(2l,1l,1,1,1r,0) |
| 34 |
--z0..cycle; % diagonals |
| 35 |
top y5r=top y6r=hround(h/2); top y5r-bot y5l=top y6r-bot y6l=thin; |
| 36 |
penpos5(whatever, angle(z2-z1)); penpos6(whatever, angle(z3-z4)); |
| 37 |
z5=whatever[z1,z2]; z6=whatever[z3,z4]; |
| 38 |
penstroke z5e--z6e; % bar line |
| 39 |
if serifs: cap_jut:=10/7 cap_jut; bracket:=10/7 bracket; |
| 40 |
pickup tiny.nib; prime_points_inside(1,2); prime_points_inside(4,3); |
| 41 |
numeric jut_factor; jut_factor:=7/8; |
| 42 |
serif(1',2,a,eta,-cap_jut); serif(4',3,d,eta,cap_jut); |
| 43 |
bracket:=jut_factor*bracket; serif(1',2,b,eta,jut_factor*cap_jut); |
| 44 |
serif(4',3,c,eta,-jut_factor*cap_jut); |
| 45 |
flourish(1,0',4,e,.65eta); fi |
| 46 |
penlabels(0,0',1,2,3,4,5,6); endchar; |
| 47 |
|
| 48 |
cmchar "The letter B (casual)"; |
| 49 |
beginchar("B",u#+cap_jut#+4thick#+1/4 side#-thin#, cap_height#, 0); |
| 50 |
adjust_fit(cap_serif_fit#,0); pickup tiny.nib; |
| 51 |
pos1(thick,0); pos2(thick,0); lft x1l=lft x2l=.5u+cap_jut; |
| 52 |
bot y2=0; top y1=h; filldraw stroke z1e--z2e; % vertical stem |
| 53 |
pos5(thick,0); pos7(thin,90); |
| 54 |
lft z3r=lft z2l; rt z3l=rt z2r+(0,thick+thin); z3=.5[z3r,z3l]; |
| 55 |
x4l=x3l+thick; y4r=y3r-o; top y4l=bot y4r+thin; |
| 56 |
x4r=x4l+thick-1/2thin; z4=.5[z4l,z4r]; |
| 57 |
y7l=h/2; x7l=x1; y6l=y7l; x6l=x4l; top y6r-bot y6l=thin; x6r=x4r; z6=.5[z6r,z6l]; |
| 58 |
rt x5r=hround(w-.5u); y5=.5[y4r,y6r]; |
| 59 |
pair where.r, where.l; where.l=down; where.r=(1,-.3); |
| 60 |
forsuffixes t=l,r: z4't=z4t+(thin,0); endfor z4'=.5[z4'r,z4'l]; |
| 61 |
filldraw stroke z3e{where.e}...z4'e..pulled_arc.e(4',5)& |
| 62 |
pulled_arc.e(5,6)..z6e--z7e; % bottom lobe |
| 63 |
pos7'(thin,-90); pos8(thick,0); pos10(thin,90); |
| 64 |
z7'=z7; z6'=z6; x6'r=x4r; x6'l=x4l; y6'r=y7'r; y6'l=y7'l; |
| 65 |
z10r=z1; x9r=x6'r; x9l=x6'l; y9r=y10r; top y9r-bot y9l=thin; z9=.5[z9r,z9l]; |
| 66 |
rt x8r=lft x5l; y8=.5[y6r,y9r]; |
| 67 |
filldraw stroke z7'e--z6'e..pulled_arc.e(6',8)&pulled_arc.e(8,9) |
| 68 |
..z9e--z10e; % upper lobe |
| 69 |
if serifs: serif(1,2,a, serif_darkness,-cap_jut); fi |
| 70 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); |
| 71 |
penlabels(6',7'); endchar; |
| 72 |
|
| 73 |
cmchar "The letter C (casual)"; |
| 74 |
beginchar("C",2u#+.9side#, cap_height#, 0); |
| 75 |
adjust_fit(0, 0); pickup tiny.nib; |
| 76 |
numeric alpha; alpha=w-u-thick; |
| 77 |
pos2(1.3thin, 90); x2=.5[x3r,x0r]; top y2r=h+o;% topmost pen position |
| 78 |
pos3(thick,180); lft z3r=(u,h/2); |
| 79 |
pos4(1.4thin, 270); x4=x2; bot y4r=-o; |
| 80 |
pos0(thick,0); lft z0l=(w+ thick-u,h/2); |
| 81 |
path p, p', line.u, line.b; line.u=(alpha,h)--(alpha,h/2); |
| 82 |
line.b=(.5[alpha,x0],0)--(.5[alpha,x0],h/2); |
| 83 |
p=pulled_arc.r(0,2)&pulled_arc.r(2,3)&pulled_arc.r(3,4) |
| 84 |
&pulled_arc.r(4,0)&cycle; |
| 85 |
p'=pulled_arc.l(0,2)&pulled_arc.l(2,3)&pulled_arc.l(3,4) |
| 86 |
&pulled_arc.l(4,0)&cycle; |
| 87 |
z'1l=line.u intersectionpoint p'; z'1r=line.u intersectionpoint p; |
| 88 |
bot rt z1l=z'1l; top rt z1r=z'1r; z1=.5[z1l,z1r]; |
| 89 |
z'5l=line.b intersectionpoint p'; z'5r=line.b intersectionpoint p; |
| 90 |
top rt z5l=z'5l; bot rt z5r=z'5r; z5=.5[z5r, z5l]; |
| 91 |
y5l:=y5r+2thick; y1l:=y1r-1.5thick; x1l:=x1r+.5thin; |
| 92 |
numeric slope_factor; slope_factor=3/4; |
| 93 |
filldraw |
| 94 |
z1r{-1,slope_factor}..{left}z2r..pulled_arc.r(2,3)&pulled_arc.r(3,4).. |
| 95 |
{right}z4r..{1,slope_factor}z5r ..(z5r+xeps)--(z5l+xeps).. |
| 96 |
reverse |
| 97 |
(z1l..{left}z2l..pulled_arc.l(2,3)&pulled_arc.l(3,4)..{right}z4l..z5l) |
| 98 |
..(z1l+xeps)--(z1r+xeps)..cycle; |
| 99 |
penlabels(0,1,2,3,4,5); endchar; |
| 100 |
|
| 101 |
cmchar "The letter D (casual)"; |
| 102 |
beginchar("D", side#+u#, cap_height#, 0); |
| 103 |
adjust_fit(cap_serif_fit#,0); |
| 104 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 105 |
lft x1l=.5u+cap_jut; x2=x1; bot y2=2oo; top y1=h; |
| 106 |
filldraw stroke z1e--z2e; % stem |
| 107 |
pos3(thin, 90); pos5(thick, 0); |
| 108 |
x3=x1; top y3r=h; z7r=z2l; |
| 109 |
pos4(thin,90); pos6(thin, -90); bot y6r=-o; |
| 110 |
x4r=x6r=hround(w/2); top y4r=h; |
| 111 |
y5=good.y .51[y4,y6]; rt x5r=good.x (w-.5u); |
| 112 |
z7r=z2l; x7l=x2r; y7l=y2r+bracket; z7=.5[z7r,z7l]; |
| 113 |
pair where.r, where.l; where.l=up; where.r=(-1,.4); |
| 114 |
filldraw stroke |
| 115 |
z3e{right}..pulled_super_arc.e(4,5,eta)&pulled_super_arc.e(5,6,eta) |
| 116 |
..{where.e}z7e; % lobe |
| 117 |
if serifs: serif(1, 2, a, eta, -cap_jut); fi |
| 118 |
penlabels(1,2,3,4,5,6,7); endchar; |
| 119 |
|
| 120 |
cmchar "The letter E (casual)"; |
| 121 |
numeric topbar_; topbar_=3/4; %17/30 % Duerer's wierd value |
| 122 |
beginchar("E", hstretch*(topbar_+1/6)*side#+u#, cap_height#,0); |
| 123 |
adjust_fit(cap_serif_fit#,0); |
| 124 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 125 |
lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0; |
| 126 |
filldraw stroke z1e--z2e; % stem |
| 127 |
pickup crisp.nib; % prepare for arms and serifs |
| 128 |
pos3(thin,90); pos4(dslab,0); |
| 129 |
x1=x3; top y3r=h; rt x4l=topbar_*side; bot y4=vround(h-1.2vstretch*thick); |
| 130 |
arm(3,4,d,eta,0); % top arm and beak |
| 131 |
pos5(thin,-90); pos0(thin,90); pos6(dslab,0); pos7(dslab,0); |
| 132 |
x5=x0=x1; y5=y0=hround(h/2); rt x6r=rt x7r=max(x4l-hstretch*thick,rt |
| 133 |
x1r+1/5side); |
| 134 |
top y6-bot y7=2vstretch*jut; y5=.5[y6,y7]; |
| 135 |
arm(5,6,e,eta,0); arm(0,7,f,eta,0); % middle arms and beaks |
| 136 |
pos8(thin,-90); pos9(dslab,0); x8=x2; bot y8r=0; rt x9r=hround(w-.5u); |
| 137 |
y9=y8r+thin+vstretch*1/6side; foot(8,9,g,eta,x9-x4-thick); % lower arm |
| 138 |
if serifs: serif(1,2,a,eta,-cap_jut); |
| 139 |
if not monospace: temp_:=slab; slab:=thin; serif(2,1,c,eta,cap_jut); |
| 140 |
slab:=temp_; fi |
| 141 |
antiserif(2,1,b,eta,jut); fi |
| 142 |
penlabels(0,1,2,3,4,5,6,7,8,9); endchar; % end of "E" |
| 143 |
|
| 144 |
cmchar "The letter F (casual)"; |
| 145 |
numeric topbar_; topbar_=3/4; % 17/30 % Duerer's wierd value |
| 146 |
beginchar("F", hstretch*(topbar_+1/6)*side#-u#, cap_height#,0); |
| 147 |
adjust_fit(cap_serif_fit#,0); |
| 148 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 149 |
lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0; |
| 150 |
filldraw stroke z1e--z2e; % stem |
| 151 |
pickup crisp.nib; % prepare for arms and serifs |
| 152 |
pos3(thin,90); pos4(dslab,0); |
| 153 |
x1=x3; top y3r=h; rt x4l=topbar_*side; bot y4=vround(h-1.2vstretch*thick); |
| 154 |
arm(3,4,d,eta,0); % top arm and beak |
| 155 |
pos5(thin,-90); pos0(thin,90); pos6(dslab,0); pos7(dslab,0); |
| 156 |
x5=x0=x1; y5=y0=hround(h/2); rt x6r=rt x7r=max(x4l-hstretch*thick,rt |
| 157 |
x1r+1/5side); |
| 158 |
top y6-bot y7=2vstretch*jut; y5=.5[y6,y7]; |
| 159 |
arm(5,6,e,eta,0); arm(0,7,f,eta,0); % middle arms and beaks |
| 160 |
if serifs: serif(1,2,a,serif_darkness,-cap_jut); |
| 161 |
serif(2,1,b,serif_darkness,-cap_jut); serif(2,1,c,serif_darkness, cap_jut); |
| 162 |
fi |
| 163 |
penlabels(0,1,2,3,4,5,6,7); endchar; % end of "F" |
| 164 |
|
| 165 |
cmchar "The letter G (casual)"; |
| 166 |
beginchar("G",2u#+.9side#, cap_height#, 0); |
| 167 |
adjust_fit(0, .5cap_serif_fit#); |
| 168 |
if monospace: pickup fine.nib; else: pickup tiny.nib;fi |
| 169 |
% This code is identical to that for the lette C. |
| 170 |
numeric alpha; alpha=w-u-thick; |
| 171 |
pos2(1.3thin, 90); x2=.5[x3r,x0r]; top y2r=h+o;% topmost pen position |
| 172 |
pos3(thick,180); lft z3r=(u,h/2); |
| 173 |
pos4(1.4thin, 270); x4=x2; bot y4r=-o; |
| 174 |
pos0(thick,0); lft z0l=(w+thick-u,h/2); |
| 175 |
path p, p', line.u, line.b; line.u=(alpha,1.5h)--(alpha,h/2); |
| 176 |
line.b=(.5[alpha,x0],0)--(.5[alpha,x0],h/2); |
| 177 |
p=pulled_arc.r(0,2)&pulled_arc.r(2,3)&pulled_arc.r(3,4) |
| 178 |
&pulled_arc.r(4,0)&cycle; |
| 179 |
p'=pulled_arc.l(0,2)&pulled_arc.l(2,3)&pulled_arc.l(3,4) |
| 180 |
&pulled_arc.l(4,0)&cycle; |
| 181 |
z'1l=line.u intersectionpoint p'; z'1r=line.u intersectionpoint p; |
| 182 |
bot rt z1l=z'1l; top rt z1r=z'1r; z1=.5[z1l,z1r]; |
| 183 |
z'5l=line.b intersectionpoint p'; z'5r=line.b intersectionpoint p; |
| 184 |
top rt z5l=z'5l; bot rt z5r=z'5r; z5=.5[z5r, z5l]; |
| 185 |
%x1l:=x1l+thin; y1l:=y1r-1.2thick-2tiny; |
| 186 |
y5l:=y5r+2thick; y1l:=y1r-1.5thick; x1l:=x1r+.5thin; |
| 187 |
% Now for addtional G work! |
| 188 |
path p,p',line.o, line.i; |
| 189 |
p=z1r..{left}z2r..pulled_arc.r(2,3)&pulled_arc.r(3,4)..{right}z4r..tension |
| 190 |
0.9..z5r; |
| 191 |
p'= reverse |
| 192 |
(z1l..tension 0.9..{left}z2l..pulled_arc.l(2,3)&pulled_arc.l(3,4)..{right}z4l |
| 193 |
..tension 0.9..z5l); |
| 194 |
pos7(thick,0); top rt z7r=(w-0u-cap_jut,.9h/2); |
| 195 |
line.o=z7r--(x7r,-2o); line.i=(z7r-(thick,0))--(x7r-thick,-2o); |
| 196 |
numeric t[],tt[]; |
| 197 |
(t1,tt1)=p intersectiontimes line.o; (t2,tt2)=p' intersectiontimes line.i; |
| 198 |
x6r=x7r; x6l=x7l; bot y6r=ypart point t1 of p; bot y6l=ypart point t2 of p'; |
| 199 |
z6=.5[z6r,z6l]; |
| 200 |
filldraw subpath(0,t1) of p--subpath(t2,infinity) of p'..(z1l+(eps,0))--cycle; |
| 201 |
filldraw stroke z6e--z7e; |
| 202 |
if serifs: serif(7,6,a,serif_darkness,-cap_jut); fi |
| 203 |
% serif(7,6,b,serif_darkness, cap_jut); fi |
| 204 |
penlabels(0,1,2,3,4,5,6,7); endchar; |
| 205 |
|
| 206 |
cmchar "The letter H (casual)"; |
| 207 |
beginchar("H", u#+2cap_jut#+.9side#, cap_height#,0); |
| 208 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib; |
| 209 |
forsuffixes t=1,2,3,4: pos.t(thick,0); endfor |
| 210 |
lft x1l=lft x2l=.5u+cap_jut; bot y2=0; top y1=h; |
| 211 |
filldraw stroke z1e--z2e; % left vertical stem |
| 212 |
x3=x4=w-x1; y3=y1; y4=y2; |
| 213 |
filldraw stroke z3e--z4e; % right vertical stem |
| 214 |
pos5(thin, 90); pos6(thin,90); |
| 215 |
x5=.5[x1r,x1l]; x6=w-x5; top y5r=top y6r=h/2; |
| 216 |
filldraw stroke z5e--z6e; % horizontal crossbar |
| 217 |
if serifs: |
| 218 |
serif(1,2,a,serif_darkness,-cap_jut); serif(1,2,b,serif_darkness,cap_jut); |
| 219 |
serif(2,1,c,serif_darkness,-cap_jut); serif(2,1,d,serif_darkness,cap_jut); |
| 220 |
serif(3,4,e,serif_darkness,-cap_jut); serif(3,4,f,serif_darkness,cap_jut); |
| 221 |
serif(4,3,g,serif_darkness,-cap_jut); serif(4,3,h,serif_darkness,cap_jut); fi |
| 222 |
labels(1,2,3,4,5,6); endchar; % end of "H" |
| 223 |
|
| 224 |
cmchar "The letter I (casual)"; |
| 225 |
beginchar("I", .5u#+2cap_jut#+cap_stem#+.5u#, cap_height#,0); |
| 226 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); |
| 227 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 228 |
x1=x2=hround(w/2); top y1=h; bot y2=0; |
| 229 |
filldraw stroke z1e--z2e; % vertical stem |
| 230 |
if serifs: |
| 231 |
serif(1, 2, a, eta, -cap_jut); serif(1, 2, b, eta, cap_jut); % top lft,rt |
| 232 |
serif(2, 1, c, eta, -cap_jut); serif(2, 1, d, eta, cap_jut); % bot lft,rt |
| 233 |
fi |
| 234 |
penlabels(1, 2); endchar; |
| 235 |
|
| 236 |
cmchar "The letter J (casual)"; |
| 237 |
beginchar("J",u#+3thick#,cap_height#, 1/4 cap_height#); |
| 238 |
adjust_fit(0, cap_serif_fit#); pickup tiny.nib; |
| 239 |
pos1(thick,0); pos2(thick,0); pos3(thin, -90); |
| 240 |
top y1=h; rt x1r=w-.5u; x2=x1; bot y2=0; lft x3=.5u; bot y3r=-d; |
| 241 |
filldraw stroke z1e--z2e{down}..{left}z3e; |
| 242 |
serif(1,2,a,serif_darkness,-cap_jut); |
| 243 |
% serif(1,2,b,serif_darkness,cap_jut); |
| 244 |
penlabels(1,2,3); endchar; |
| 245 |
|
| 246 |
cmchar "The letter K"; |
| 247 |
beginchar("K", 3/2u#+cap_jut#+.9side#, cap_height#,0); |
| 248 |
adjust_fit(cap_serif_fit#,0); pickup tiny.nib; |
| 249 |
pair durer[]; % represent D\"urer's corner points |
| 250 |
durer1=(.5u,h); durer2=(w-u,h); durer3=(xpart durer1,0); |
| 251 |
durer4=(xpart durer2,0); |
| 252 |
numeric diag_angle[]; diag_angle1=angle(durer2-durer3); |
| 253 |
diag_angle2=angle(durer1-durer4); |
| 254 |
numeric alpha; alpha=((xpart durer2 - xpart durer1)++h)/h; |
| 255 |
pos1(thick,0); pos2(thick,0); lft x1l=lft x2l=.5u+cap_jut; |
| 256 |
top y1=h; bot y2=0; filldraw stroke z1e--z2e; % left stem |
| 257 |
pos3(alpha*thin,0); pos4(alpha*thin,0); rt x4r=rt x1r; y4=h/2; |
| 258 |
top y3=h; z3r-z4r=whatever*(durer2-durer3); |
| 259 |
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; |
| 260 |
filldraw z0--z3l--z3r--z4r--cycle; % upper diagonal stroke |
| 261 |
pos5(thick,diag_angle1); z5=whatever[z3,z4]; |
| 262 |
z0-z5l=whatever*(durer1-durer4); |
| 263 |
numeric nibs; nibs=dslab; |
| 264 |
pos6(nibs,90); bot rt z6l=durer4; |
| 265 |
z5l-z7l=whatever*(durer1-durer4); z.g=(xpart durer2-thin,h/2); |
| 266 |
z.g-z7l=whatever*(durer2-durer3); z.h=(xpart durer2, h/4); |
| 267 |
z.g -z7r=whatever*(durer2-durer3); |
| 268 |
z5r-z7r=whatever*(durer1-durer4); |
| 269 |
%if serifs or not monospace: % reset x7 if necessary |
| 270 |
% if (x7r-x1l)/(x6-x1l)>.82: numeric temp; temp=x7r; x7r:=.82*(x6-x1l)+x1l; |
| 271 |
% temp:=temp-x7r; x7l:=x7l-temp; fi |
| 272 |
filldraw z5r--z5l--z7l{z7l-z5l}..{right}z6l--z6r{left}..{durer1-durer4}z7r |
| 273 |
--cycle; % lower diagonal stroke |
| 274 |
if serifs: |
| 275 |
numeric old_jut, old_brack; old_jut=cap_jut; old_brack=bracket; |
| 276 |
serif(1,2,a,serif_darkness,-cap_jut); serif(1,2,b,serif_darkness,cap_jut); |
| 277 |
serif(2,1,c,serif_darkness,-cap_jut); serif(2,1,d,serif_darkness,cap_jut); |
| 278 |
%bracket:=.75old_brack;cap_jut:=.75old_jut; |
| 279 |
%serif(3,4,e,serif_darkness,-cap_jut); |
| 280 |
bracket:=2old_brack; cap_jut:=old_jut; serif(3,4,f,.6serif_darkness,cap_jut); |
| 281 |
cap_jut:=old_jut; bracket:=old_brack; |
| 282 |
fi |
| 283 |
penlabels(0,1,2,3,4,5,6,7); endchar; |
| 284 |
|
| 285 |
cmchar "The letter L (casual)"; |
| 286 |
numeric topbar_; topbar_=3/4; % 17/30; % Duerer's wierd value |
| 287 |
beginchar("L", hstretch*(topbar_+1/6)*side#+u#, cap_height#,0); |
| 288 |
adjust_fit(cap_serif_fit#,0); |
| 289 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 290 |
lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0; |
| 291 |
filldraw stroke z1e--z2e; % stem |
| 292 |
pickup crisp.nib; % prepare for arms and serifs |
| 293 |
pos3(thin,90); pos4(dslab,0); |
| 294 |
rt x4l=topbar_*side; bot y4=vround(h-vstretch*thick); |
| 295 |
pos8(thin,-90); pos9(dslab,0); x8=x2; bot y8r=0; rt x9r=hround(w-.5u); |
| 296 |
y9=y8r+thin+vstretch*1/6side; foot(8,9,g,eta,x9-x4-thick); % lower arm |
| 297 |
if serifs: serif(1,2,a,serif_darkness,-cap_jut); |
| 298 |
serif(2,1,b,serif_darkness,-cap_jut); serif(1,2,d,serif_darkness,cap_jut); |
| 299 |
if not monospace: temp_:=slab; slab:=thin; serif(2,1,c,serif_darkness,cap_jut); |
| 300 |
slab:=temp_; fi fi |
| 301 |
penlabels(0,1,2,3,4,5,6,7,8,9); endchar; % end of "L" |
| 302 |
|
| 303 |
cmchar"The letter M (casual)"; |
| 304 |
beginchar("M", u#+2cap_jut#+side#, cap_height#, 0); |
| 305 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib; |
| 306 |
pos1(thin,0); pos2(thin,0); lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0; |
| 307 |
pos3(thick,0); pos4(thick,0); x3r=x4r=w-x1l; top y3=h; bot y4=0; |
| 308 |
filldraw stroke z1e--z2e; % left vertical stem |
| 309 |
filldraw stroke z3e--z4e; % right vertical stem |
| 310 |
numeric long, short, hypot, alpha; long=h-bracket; short=w/2-thin-cap_jut; |
| 311 |
hypot=long++short; alpha=hypot/long; |
| 312 |
pos5(alpha*thick,0); pos6(alpha*thick,0); |
| 313 |
z5l=z1l; bot lft z6l=(w/2-.5currentbreadth,if not monospace:0 else:h/3 fi); |
| 314 |
pos7(alpha*thin,0); pos8(alpha*thin,0); |
| 315 |
z6l=z7r; z8l=z3l; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; |
| 316 |
filldraw z5r--z0--z8l--z8r--z6l--z5l--cycle; |
| 317 |
if serifs: |
| 318 |
serif(2,1,a,serif_darkness,-cap_jut); serif(1,2,b,serif_darkness,-cap_jut); |
| 319 |
% left serifs |
| 320 |
serif(3,4,c,serif_darkness, cap_jut); serif(4,3,d,serif_darkness, cap_jut); |
| 321 |
% right serifs |
| 322 |
serif(2,1,e,serif_darkness,cap_jut); serif(4,3,f,serif_darkness,-cap_jut); |
| 323 |
% lower, inner serifs |
| 324 |
fi |
| 325 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 326 |
|
| 327 |
cmchar "The letter N (casual)"; |
| 328 |
beginchar("N", u#+2cap_jut#+.8side#, cap_height#,0); |
| 329 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib; |
| 330 |
numeric long, short, hypot, alpha; long=h; short=side-2cap_jut; |
| 331 |
hypot=long++short; alpha=hypot/long; |
| 332 |
pos1(thin,0); pos2(thin,0); lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0; |
| 333 |
pos3(thin,0); pos4(thin,0); x3=x4; x3r=w-x1l; y3=y1; y4=y2-o; |
| 334 |
pos 5(alpha*thick,0); pos6(alpha*thick,0); |
| 335 |
z5r=z1r; z6l=z4r; z0=whatever[z1r,z2r]=whatever[z5l,z6l]; % under notch point |
| 336 |
z0'=whatever[z5r,z6r]=whatever[z3l,z4l]; |
| 337 |
filldraw z1r--z1l--z2l--z2r--z0--z6l--z3r--z3l--z0'--cycle; |
| 338 |
if serifs: |
| 339 |
serif(2,1,b,serif_darkness,-cap_jut); serif(2,1,c,serif_darkness,cap_jut); |
| 340 |
% bottom, left serifs |
| 341 |
serif(3,4,d,serif_darkness,-cap_jut);serif(3,4,e,serif_darkness,cap_jut); |
| 342 |
% top right serifs |
| 343 |
z.a=(x1l-1.5cap_jut,y1); pickup tiny.nib; filldraw |
| 344 |
z0{z0-z4r}..{left}(z.a-(0,eps))..z.a--z1r--cycle; |
| 345 |
fi |
| 346 |
penlabels(0,0',1,2,3,4,5,6); endchar; |
| 347 |
|
| 348 |
cmchar "The letter O (casual)"; |
| 349 |
beginchar("O", 2u#+side#, cap_height#, 0); |
| 350 |
adjust_fit(0,0); |
| 351 |
x2r=u; x4r=w-u; y1r=h+o; y3r=-o; z0=(w/2,h/2); |
| 352 |
z0=.5[z5,z6]; numeric axis_angle; |
| 353 |
axis_angle=angle( (x4r,y1r)-(x2r,y3r) ); |
| 354 |
axis_angle:=axis_angle*axis; |
| 355 |
z5-z6=(thick,0)rotated axis_angle; |
| 356 |
y2r=y6; y4r=y5; x1r=x5; x3r=x6; |
| 357 |
forsuffixes $=1,2,3,4: z$=.5[z$l,z$r]; endfor |
| 358 |
x1l=x3r; y1l-y6=y6-y3r; x5-x2l=x4r-x5; y2l=y4r; |
| 359 |
x3l=x1r; y1r-y5=y5-y3l; x4l-x6=x6-x2r; y4l=y2r; |
| 360 |
path p,p'; |
| 361 |
p=pulled_arc.r(1,2)&reverse pulled_arc.r(3,2)& |
| 362 |
pulled_arc.r(3,4)&reverse pulled_arc.r(1,4)&cycle; |
| 363 |
path anti_diag; anti_diag=(z0--(1.5w,y4))rotatedaround(z0,axis_angle+90); |
| 364 |
z21r=p intersectionpoint anti_diag; penpos21(thin, axis_angle+90); |
| 365 |
x43r=w-x21r; y43r=h-y21r; penpos43(thin, axis_angle+270); |
| 366 |
path diag; diag=(z0--(1.5w,y4))rotatedaround(z0, axis_angle); |
| 367 |
z41r=diag intersectionpoint p; penpos41(thick, axis_angle); |
| 368 |
x32r=w-x41r; y32r=h-y41r; penpos32(thick, axis_angle+180); |
| 369 |
if monospace: x2l:=x21l; x4l:=x43l; fi |
| 370 |
p'= |
| 371 |
z1l{left}..z21l...z2l{down}..z32l..z3l{right}..z43l..z4l{up} |
| 372 |
..z41l..{left}cycle; |
| 373 |
fill p; unfill p'; |
| 374 |
penlabels(0,1,2,3,4,5,6,21,32,43,41); endchar; |
| 375 |
|
| 376 |
cmchar "The letter P (casual)"; |
| 377 |
beginchar("P", 1.5u#+P_width#, cap_height#, 0); |
| 378 |
adjust_fit(cap_serif_fit#, 0); |
| 379 |
pickup tiny.nib; pos1(thick,0); pos2(thick,0); |
| 380 |
top lft z1l=(.5u+cap_jut,h); bot lft z2l=(.5u+cap_jut,0); |
| 381 |
filldraw stroke z1e--z2e; % vertical stem |
| 382 |
pos3(thin,90); pos4(thin,90); pos5(thick,0); |
| 383 |
pos6(thin,-90); |
| 384 |
top y3r=top y4r=h; x3=x1; x4=x1r+thick; filldraw stroke z3e--z4e; |
| 385 |
x6=x4; y6=hround h/2; rt x5r=hround(w-u); y5=.5[y4,y6]; |
| 386 |
y7=y6; x7=.75[rt x1r, x6]; |
| 387 |
pos7(thin, -90); |
| 388 |
filldraw stroke pulled_super_arc.e(4,5,eta)&pulled_super_arc.e(5,6,eta)..z7e; |
| 389 |
if serifs: serif(1,2,a,eta,-cap_jut); serif(2,1,b,eta,-cap_jut); |
| 390 |
serif(2,1,c,eta,cap_jut); fi |
| 391 |
penlabels(1,2,3,4,5,6,7); endchar; |
| 392 |
|
| 393 |
cmchar "The letter Q (casual)"; |
| 394 |
beginchar("Q", 2u#+side#, cap_height#, 0); |
| 395 |
adjust_fit(0,0); |
| 396 |
x2r=u; x4r=w-u; y1r=h+o; y3r=-o; z0=(w/2,h/2); |
| 397 |
z0=.5[z5,z6]; numeric axis_angle; |
| 398 |
axis_angle=angle( (x4r,y1r)-(x2r,y3r) ); |
| 399 |
axis_angle:=axis_angle*axis; |
| 400 |
z5-z6=(thick,0)rotated axis_angle; |
| 401 |
y2r=y6; y4r=y5; x1r=x5; x3r=x6; |
| 402 |
forsuffixes $=1,2,3,4: z$=.5[z$l,z$r]; endfor |
| 403 |
x1l=x3r; y1l-y6=y6-y3r; x5-x2l=x4r-x5; y2l=y4r; |
| 404 |
x3l=x1r; y1r-y5=y5-y3l; x4l-x6=x6-x2r; y4l=y2r; |
| 405 |
path p,p'; |
| 406 |
p=pulled_arc.r(1,2)&reverse pulled_arc.r(3,2)& |
| 407 |
pulled_arc.r(3,4)&reverse pulled_arc.r(1,4)&cycle; |
| 408 |
path anti_diag; anti_diag=(z0--(1.5w,y4))rotatedaround(z0,axis_angle+90); |
| 409 |
z21r=p intersectionpoint anti_diag; penpos21(thin, axis_angle+90); |
| 410 |
x43r=w-x21r; y43r=h-y21r; penpos43(thin, axis_angle+270); |
| 411 |
path diag; diag=(z0--(1.5w,y4))rotatedaround(z0, axis_angle); |
| 412 |
z41r=diag intersectionpoint p; penpos41(thick, axis_angle); |
| 413 |
x32r=w-x41r; y32r=h-y41r; penpos32(thick, axis_angle+180); |
| 414 |
if monospace: x2l:=x21l; x4l:=x43l; fi |
| 415 |
p'= |
| 416 |
z1l{left}..z21l...z2l{down}..z32l..z3l{right}..z43l..z4l{up} |
| 417 |
..z41l..{left}cycle; |
| 418 |
fill p; unfill p'; |
| 419 |
% now for the tail! |
| 420 |
numeric thick',thick''; thick'=(1-tail_corr)*thick; thick''=(1+tail_corr)*thick; |
| 421 |
numeric tail_slope; tail_slope=-20/36; % measured from D\"urer's figure |
| 422 |
z10r=p intersectionpoint (z0--(x4r,0)); |
| 423 |
z10l=p intersectionpoint (quartercircle rotated 180 scaled 2thick' |
| 424 |
shifted z10r); |
| 425 |
y12r-y10r=tail_slope*(x12r-x10r); x12r=4/3x4r; |
| 426 |
numeric tail_angle; tail_angle=angle(z10r-z12r)-90; |
| 427 |
penpos12(thick',tail_angle); |
| 428 |
penpos11(thick'', tail_angle); z11=(x4r,0); |
| 429 |
x14=19/8 x4r; y14=-3/8h; penpos14(max(2,eps),90); |
| 430 |
numeric tail_length; tail_length=x14-x10r; |
| 431 |
penpos13(max(2,tail_corr*thick),90); |
| 432 |
x13=x14-1/9tail_length; y13=(1+.25tail_corr)*y14; |
| 433 |
fill stroke z10.e..z11.e..z12.e if not monospace:..z13.e{right}..z14.e fi; |
| 434 |
penlabels(0,1,2,3,4,5,6,10,11,12,13,14,15); endchar; |
| 435 |
|
| 436 |
cmchar "The letter R (casual)"; |
| 437 |
beginchar("R", .5u#+max(cap_jut#+.9side#,1.5P_width#), cap_height#,0); |
| 438 |
adjust_fit(cap_serif_fit#,0); |
| 439 |
pickup tiny.nib; pos1(thick,0); pos2(thick,0); |
| 440 |
top lft z1l=(.5u+cap_jut,h); bot lft z2l=(.5u+cap_jut,0); |
| 441 |
filldraw stroke z1e--z2e; % vertical stem |
| 442 |
pos3(thin,90); pos4(thin,90); pos5(thick,0); |
| 443 |
pos6(if serifs: dslab else:thin fi,-90); |
| 444 |
top y3r=top y4r=h; x3=x1; x4=x1r+thick; |
| 445 |
x6=x4; y6=hround h/2; rt x5r=hround(.5u+P_width); y5=.5[y4,y6]; |
| 446 |
y7=y6; x7=.75[rt x1r, x6]; |
| 447 |
pos7(if serifs:dslab else:thin fi,-90); |
| 448 |
filldraw stroke z3e--z4e..pulled_super_arc.e(4,5,eta)& |
| 449 |
pulled_super_arc.e(5,6,eta)..z7e; |
| 450 |
path p; p=pulled_super_arc.r(5,6,eta)..z7r; |
| 451 |
numeric half_letter_width; 2half_letter_width+1/2u=w; |
| 452 |
half_letter_width:=half_letter_width+1/2u; |
| 453 |
z0r=p intersectionpoint ((half_letter_width,0)--(half_letter_width,h)); |
| 454 |
path circ_; circ_= (((halfcircle scaled 2thick) rotated 180) shifted z0r); |
| 455 |
z0l= p intersectionpoint circ_; |
| 456 |
if not monospace: z0'=(.45[half_letter_width,w],0); |
| 457 |
else: z0'=(.4[half_letter_width,w],0); fi |
| 458 |
numeric tail_angle; tail_angle=angle(z0l-z0'); |
| 459 |
penpos8(thick, tail_angle-90); z8l=whatever[z0', z0l]; |
| 460 |
x8=1/5[half_letter_width,w]; |
| 461 |
penpos9(2/3thick,tail_angle-90); z9r=whatever[z0r, z8r]; |
| 462 |
x9r=.5[half_letter_width, w]; penpos10(1/2thin,90); z10l=(w,0); |
| 463 |
fill z0l--z8l...{right}z10l--z10r{-w,1/4h}..z9r--z0r--cycle; % tail |
| 464 |
if serifs: serif(1,2,a,eta,-cap_jut); serif(2,1,b,eta,-cap_jut); |
| 465 |
serif(2,1,c,eta,cap_jut); fi |
| 466 |
penlabels(0,1,2,3,4,5,6,7,8,9,10); labels(0'); endchar; |
| 467 |
|
| 468 |
cmchar "The Knuthian S (casual)"; |
| 469 |
beginchar("S", 2u#+1/2 side# if not monospace:+thick# fi, cap_height#, 0); |
| 470 |
adjust_fit(0,0); pickup tiny.nib; |
| 471 |
pair durer[]; % points to contain corner coords of Durer square |
| 472 |
ypart durer3=ypart durer4=0; xpart durer4-xpart durer1=side; |
| 473 |
xpart durer1=u-1.5thick; |
| 474 |
durer1=(xpart durer3, h); durer2=(xpart durer 4, ypart durer1); |
| 475 |
numeric slope, diag_angle; diag_angle=angle(durer2-durer3); |
| 476 |
slope=-3/4h/(xpart durer4-xpart durer3); |
| 477 |
pos0(thick,diag_angle); x0=.52[xpart durer1, xpart durer2]; |
| 478 |
y0=h/2; |
| 479 |
pos2(thin,-90); top y2l=h+o; x2=x0+thin; lft x3l=u+2/3thick; rt x3r=lft x3l+5/6thick; |
| 480 |
if not monospace: |
| 481 |
if x2-rt x3r<thick: x2:=lft x3r+thick; x2l:=x2r:=x2; fi fi |
| 482 |
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); |
| 483 |
pos7(thin,-90); x7=x0; y7=-o; rt x6r=w-u; lft x6l=rt x6r-thick; |
| 484 |
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); |
| 485 |
pos1(5/6 thick,-90); top y1l=h+o-thin; rt x1=x0+2thick+o; |
| 486 |
pos8(1.5thick,-80);lft x8r=u; bot y8r=thin-o; |
| 487 |
filldraw z1l..z2l{left}..{down}z3l..z4l--z5l..{down}z6l..{left}z7l..z8l |
| 488 |
--z8r..{right}z7r..{up}z6r..z5r--z4r..{up}z3r..{right}z2r..z1r--cycle; |
| 489 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 490 |
|
| 491 |
cmchar "The letter T (casual)"; |
| 492 |
beginchar("T",2u#+.9side#, cap_height#,0); |
| 493 |
adjust_fit(0,0); pickup tiny.nib; |
| 494 |
pos1(thick,0); pos2(thick,0); .5[x1r,x1l]=w/2; .5[x2r,x2l]=w/2; |
| 495 |
top y1=h; bot y2=0; filldraw stroke z1e--z2e; % central stem |
| 496 |
numeric alpha, stroke_angle; stroke_angle=55; |
| 497 |
if monospace: alpha=1; else: alpha=sqrt2; fi |
| 498 |
if not serifs: stroke_angle:=90; alpha:=1; fi % sans-serif values |
| 499 |
pos3(alpha*thin,stroke_angle); pos4(alpha*thin,stroke_angle); |
| 500 |
lft x3l=u; top y3r=h; x4r=w-x3l; y4=y3; |
| 501 |
filldraw stroke z3e--z4e; % top horizontal |
| 502 |
numeric old_jut; old_jut=cap_jut; |
| 503 |
if serifs: |
| 504 |
serif(2,1,a,serif_darkness,-cap_jut);serif(2,1,b,serif_darkness,cap_jut); |
| 505 |
cap_jut:=.6old_jut; |
| 506 |
T_flourish(3,4,c,serif_darkness,-.5serif_darkness); cap_jut:=old_jut; |
| 507 |
fi |
| 508 |
penlabels(1,2,3,4); endchar; |
| 509 |
|
| 510 |
cmchar "The letter U (casual)"; |
| 511 |
beginchar("U", u#+2cap_jut#+.9side#, cap_height#,0); |
| 512 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); |
| 513 |
pickup tiny.nib; pos1(thick,0); pos2(thick,0); pos2'(thick,180); |
| 514 |
pos3(0[thin,thick],-90); pos4(thin,0); pos5(thin,0); |
| 515 |
x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r; |
| 516 |
top y1=top y5=h; y2=y4=1/3h; bot y3r=-o; z2'=z2; |
| 517 |
lft x1l=hround .5u+cap_jut; |
| 518 |
filldraw stroke z1e--z2e; % left stem |
| 519 |
filldraw stroke pulled_super_arc.e(2',3,eta) |
| 520 |
& pulled_super_arc.e(3,4,eta)&z4e--z5e; |
| 521 |
if serifs: serif(1,2,a,eta,-cap_jut); serif(1,2,b,eta,cap_jut); |
| 522 |
serif(5,4,c,eta,-cap_jut); serif(5,4,d,eta,cap_jut); |
| 523 |
fi |
| 524 |
penlabels(1,2,3,4,5); endchar; |
| 525 |
|
| 526 |
cmchar "The letter V (casual)"; |
| 527 |
beginchar("V", 20/7 cap_jut#+.9side#, cap_height#, 0); |
| 528 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib; |
| 529 |
numeric alpha; alpha=((h+cap_jut)++(w/2))/(h+cap_jut); |
| 530 |
pos1(alpha*thick,0); pos2(alpha*thick,0); |
| 531 |
pos3(alpha*thin,0); pos4(alpha*thin,0); |
| 532 |
top y1=top y4=h; lft x1l=10/7 cap_jut; x4r=w-x1l; |
| 533 |
lft x2l=hround w/2; x3r=x2l; bot y2=bot y3=-apex_o; |
| 534 |
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; % notch point |
| 535 |
filldraw z0--diag_end(0,4l,1,4,4r,3r)--z2l |
| 536 |
--diag_end(2l,1l,1,1,1r,0)--cycle; |
| 537 |
if serifs: bracket:=10/7 bracket; cap_jut:=10/7 cap_jut; |
| 538 |
pickup tiny.nib; numeric jut_factor; jut_factor=9/8; |
| 539 |
serif(1,2,a,.8serif_darkness,-.8cap_jut); |
| 540 |
serif(1,2,b,.8serif_darkness,.6cap_jut); |
| 541 |
bracket:=jut_factor*bracket; |
| 542 |
serif(4,3,d,2/3serif_darkness,.8jut_factor*cap_jut); |
| 543 |
serif(4,3,c,2/3serif_darkness,-2/3jut_factor*cap_jut); |
| 544 |
fi |
| 545 |
penlabels(0,1,2,3,4); endchar; % End of "V" (casual) |
| 546 |
|
| 547 |
cmchar "The letter W (casual)"; |
| 548 |
numeric alpha; |
| 549 |
alpha=((cap_height#+cap_jut#)++(.4side#+10/7cap_jut#))/(cap_height#+cap_jut#); |
| 550 |
beginchar("W", 20/7 cap_jut#+1.6side#-alpha*thick#, cap_height#, 0); |
| 551 |
adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib; |
| 552 |
mid_corr=if monospace: -apex_corr else: 1/3jut fi; |
| 553 |
pos1(alpha*thick,0); pos2(alpha*thick,0); |
| 554 |
pos3(alpha*thin,0); pos4(alpha*thin,0); |
| 555 |
pos5(alpha*thick,0); pos6(alpha*thick,0); |
| 556 |
pos7(alpha*thin,0); pos8(alpha*thin,0); |
| 557 |
numeric V_width; V_width=20/7 cap_jut+4/5side; |
| 558 |
top y1=top y4=h; lft x1l=10/7 cap_jut; x4r=V_width-x1l; |
| 559 |
lft x2l=hround V_width/2; x3r=x2l; bot y2=bot y3=-apex_o; |
| 560 |
pair shift_amt; ypart shift_amt=0; |
| 561 |
xpart shift_amt=V_width-20/7cap_jut-alpha*(thick); |
| 562 |
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; % notch point |
| 563 |
path p; p=z0--diag_end(0,4l,1,1,4r,3r)--z2l |
| 564 |
--diag_end(2l,1l,1,1,1r,0)--cycle; |
| 565 |
filldraw p; filldraw (p shifted shift_amt); % the 2 V's |
| 566 |
forsuffixes t=1,2,3,4: z[t+4]=z.t shifted shift_amt; endfor |
| 567 |
if serifs: bracket:=10/7 bracket; cap_jut:=10/7 cap_jut; |
| 568 |
pickup tiny.nib; numeric jut_factor; jut_factor=9/8; |
| 569 |
serif(1,2,a,.8serif_darkness,-.7cap_jut); |
| 570 |
serif(8,7,f,.8serif_darkness,.7cap_jut); |
| 571 |
%serif(5,6,d,.8serif_darkness,.6cap_jut); |
| 572 |
%serif(5,6,c,.8serif_darkness,-.6cap_jut); |
| 573 |
bracket:=jut_factor*bracket; |
| 574 |
serif(1,2,b,.6serif_darkness, .6cap_jut); |
| 575 |
serif(8,7,e,.7serif_darkness,-.6cap_jut); |
| 576 |
fi |
| 577 |
penlabels(0,0',1,2,3,4,5,6,7,8,45); endchar; % End of "W" (casual) |
| 578 |
|
| 579 |
cmchar "The letter X"; |
| 580 |
beginchar("X", 20/7cap_jut#+.9side#, cap_height#, 0); |
| 581 |
adjust_fit(0cap_serif_fit#,0cap_serif_fit#); pickup tiny.nib |
| 582 |
numeric alpha; alpha=(h++(w-20/7cap_jut))/h; |
| 583 |
lft x1l=.8cap_jut; top y1=h; pos1(alpha*thick, 0); |
| 584 |
x4r=w-x1l; bot y4=0; pos4(alpha*thick,0); |
| 585 |
x2r=w-x1l; y2=y1; pos2(alpha*thin,0); |
| 586 |
x3l=w-x2r; y3=y4; pos3(alpha*thin,0); |
| 587 |
filldraw diag_end(4r,1r,.5,1,1l,4l)--diag_end(1l,4l,.5,1,4r,1r)--cycle; %lft diag |
| 588 |
filldraw diag_end(2l,3l,.5,1,3r,2r)--diag_end(3r,2r,.5,1,2l,3l)--cycle; % rt diag |
| 589 |
if serifs: bracket:=10/7 bracket; cap_jut:=.7cap_jut; |
| 590 |
pickup tiny.nib; |
| 591 |
serif(1,4,a,.6serif_darkness,-.8cap_jut);serif(4,1,d,.6serif_darkness,.8cap_jut); |
| 592 |
serif(2,3,f,.7serif_darkness,.8cap_jut);serif(3,2,g,.7serif_darkness,-.8cap_jut); |
| 593 |
serif(1,4,b,.5 serif_darkness,.6cap_jut); |
| 594 |
serif(4,1,c,.5 serif_darkness,-.6cap_jut); |
| 595 |
serif(2,3,e,.5 serif_darkness,-.6cap_jut); |
| 596 |
serif(3,2,h,.5 serif_darkness,.6cap_jut); fi |
| 597 |
penlabels(1,2,3,4); endchar; |
| 598 |
|
| 599 |
cmchar "The letter Y (casual)"; |
| 600 |
beginchar("Y", 2cap_jut#+1.0side#, cap_height#, 0); |
| 601 |
adjust_fit(0cap_serif_fit#, 0cap_serif_fit#); pickup pencircle scaled 0pt; |
| 602 |
pickup tiny.nib; |
| 603 |
numeric alpha, long, short, hypot; long=h/2; |
| 604 |
short=.5(w-thick)-cap_jut; |
| 605 |
hypot=long++short; alpha=hypot/long; |
| 606 |
pos1(thick,0); lft x1l=cap_jut+.5crisp; top y1=h; |
| 607 |
pos4(thin,0); x4r=w-x1l; y4=y1; |
| 608 |
pos2(thick,0); pos3(thin,0); |
| 609 |
pos5(thick,0); pos6(thick,0); |
| 610 |
x5=x6=w/2; bot y6=0; y5=h/2; |
| 611 |
x2l=x5l; x3r=x5r; y2=y3=h/2; |
| 612 |
z0=whatever[z1r, z2r]=whatever[z3l,z4l]; % notch point |
| 613 |
filldraw z1l--z5l--z6l--z6r--z5r--z4r--z4l--z0--z1r--cycle; |
| 614 |
if serifs: numeric jut_factor; |
| 615 |
serif(6,5,e,.4serif_darkness,-.6cap_jut); serif(6,5,f,.4serif_darkness,.6cap_jut); |
| 616 |
% bottom serifs |
| 617 |
serif(1,2,a,.4serif_darkness,-.6cap_jut);serif(4,3,d,.4serif_darkness,.6cap_jut); |
| 618 |
% top, outer serifs |
| 619 |
serif(1,2,b,.4serif_darkness,.4cap_jut); |
| 620 |
serif(4,3,c,.4serif_darkness,-.4cap_jut); % top, inner serifs |
| 621 |
fi |
| 622 |
penlabels(0,1,2,3,4,5,6); endchar; % End of "Y" (casual) |
| 623 |
|
| 624 |
cmchar "The letter Z (casual)"; |
| 625 |
beginchar("Z", 2u#+.8side#, cap_height#,0); |
| 626 |
adjust_fit(0, 0); pickup tiny.nib; |
| 627 |
numeric alpha, long, short, hypot; |
| 628 |
long=h; short=w-2u-thick; hypot=long++short; |
| 629 |
alpha=hypot/long; |
| 630 |
pos1(thin,90); pos2(thin,90); pos3(alpha*thick, 0); |
| 631 |
pos4(alpha*thick, 0); pos5(thin,-90); pos6(thin,-90); |
| 632 |
rt x3r=w-u; top y3=h; x4l=w-x3r; bot y4=0; |
| 633 |
top y1r=h; lft x1=u; y2=y1; rt x2=x3; |
| 634 |
bot y5r=bot y6r=0; lft x5=x4; rt x6=w-u; |
| 635 |
%filldraw stroke z1e--z2e; % top bar |
| 636 |
filldraw stroke z3e--z4e; % diagonal |
| 637 |
filldraw stroke z5e--z6e; % bottom bar |
| 638 |
if serifs: pickup crisp.nib; % prepare for arms and serifs |
| 639 |
pos7(thin, 90); pos8(dslab,180); z7=z2; lft x8r=u; |
| 640 |
bot y8=h-1.3vstretch*thick; |
| 641 |
arm(7,8,a,serif_darkness,0); % upper dropped serif |
| 642 |
pos9(thin,-90); z9=z5; pos10(dslab,0); rt x10r=w-u; |
| 643 |
top y10=1.33vstretch*thick; |
| 644 |
arm(9,10,b,serif_darkness,0); fi |
| 645 |
penlabels(1,2,3,4,5,6,7,8,9,10); endchar; |
| 646 |
|
| 647 |
|