| 1 |
.cmchar "The Fraktur comma"; |
| 2 |
.beginchar(",",5u#,x_height#,0); |
| 3 |
.adjust_fit(usual_left#,usual_right#); |
| 4 |
penpos1(0.23570*(x_height+2apex_o),45); |
| 5 |
penpos2(0.23570*(x_height+2apex_o),45); |
| 6 |
penpos3(0.23570*(x_height+2apex_o),45); |
| 7 |
penpos4(0.23570*(x_height+2apex_o),45); |
| 8 |
penpos5(0.23570*(x_height+2apex_o),45); |
| 9 |
penpos6(0.23570*(x_height+2apex_o),45); |
| 10 |
x1l=x3l=x5l=0.5w; |
| 11 |
z2r=z3l; z4r=z5l; |
| 12 |
z2-z1=whatever*dir135; |
| 13 |
z4-z3=whatever*dir135; |
| 14 |
z6-z5=whatever*dir135; |
| 15 |
y1l=-apex_o; y6r=x_height+apex_o; |
| 16 |
%penstroke z1e--z2e; |
| 17 |
penpos10(0.11785*(x_height+2apex_o),-30); |
| 18 |
z10l=(x2l-apex_o,-1.3y2r); |
| 19 |
filldraw z10l--z2l+(2hair,0){up}..{down} |
| 20 |
z1r--z10r--z10l & cycle; |
| 21 |
.endchar; |
| 22 |
|
| 23 |
.cmchar "The Fraktur colon"; |
| 24 |
.beginchar(":",5u#,x_height#,0); |
| 25 |
.adjust_fit(usual_left#,usual_right#); |
| 26 |
penpos1(0.23570*(x_height+2apex_o),45); |
| 27 |
penpos2(0.23570*(x_height+2apex_o),45); |
| 28 |
penpos3(0.23570*(x_height+2apex_o),45); |
| 29 |
penpos4(0.23570*(x_height+2apex_o),45); |
| 30 |
penpos5(0.23570*(x_height+2apex_o),45); |
| 31 |
penpos6(0.23570*(x_height+2apex_o),45); |
| 32 |
x1l=x3l=x5l=0.5w; |
| 33 |
z2r=z3l; z4r=z5l; |
| 34 |
z2-z1=whatever*dir135; |
| 35 |
z4-z3=whatever*dir135; |
| 36 |
z6-z5=whatever*dir135; |
| 37 |
y1l=-apex_o; y6r=x_height+apex_o; |
| 38 |
penstroke z1e--z2e; |
| 39 |
penstroke z5e--z6e; |
| 40 |
.endchar; |
| 41 |
|
| 42 |
.cmchar "The Fraktur semicolon"; |
| 43 |
.beginchar(";",5u#,x_height#,0); |
| 44 |
.adjust_fit(usual_left#,usual_right#); |
| 45 |
penpos1(0.23570*(x_height+2apex_o),45); |
| 46 |
penpos2(0.23570*(x_height+2apex_o),45); |
| 47 |
penpos3(0.23570*(x_height+2apex_o),45); |
| 48 |
penpos4(0.23570*(x_height+2apex_o),45); |
| 49 |
penpos5(0.23570*(x_height+2apex_o),45); |
| 50 |
penpos6(0.23570*(x_height+2apex_o),45); |
| 51 |
x1l=x3l=x5l=0.5w; |
| 52 |
z2r=z3l; z4r=z5l; |
| 53 |
z2-z1=whatever*dir135; |
| 54 |
z4-z3=whatever*dir135; |
| 55 |
z6-z5=whatever*dir135; |
| 56 |
y1l=-apex_o; y6r=x_height+apex_o; |
| 57 |
penstroke z1e--z2e; |
| 58 |
penstroke z5e--z6e; |
| 59 |
penpos10(hair,-30); z10l=(x2l,-y2r); |
| 60 |
filldraw z10l{z1r-z10r}..z2l{z2-z1} |
| 61 |
& z2l--z1r--z10r--z10l & cycle; |
| 62 |
.endchar; |
| 63 |
|
| 64 |
.cmchar "The Fraktur point"; |
| 65 |
.beginchar(".",5u#,x_height#,0); |
| 66 |
.adjust_fit(usual_left#,usual_right#); |
| 67 |
pointpoint; |
| 68 |
.endchar; |
| 69 |
|
| 70 |
.cmchar "Grave accent"; |
| 71 |
.beginchar(oct"022",9u#,min(asc_height#,2x_height#),0); |
| 72 |
.adjust_fit(0,0); |
| 73 |
if serifs: pickup crisp.nib; x1-.5stem=hround 2u; x2=2/3[x1,w-x1]; |
| 74 |
y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair); |
| 75 |
numeric theta; theta=angle(z2-z1)+90; |
| 76 |
pos1(stem,theta); pos2(hair,theta); |
| 77 |
filldraw circ_stroke z1e--z2e; % diagonal |
| 78 |
else: pickup fine.nib; pos1(stem,0); pos2(vair,0); |
| 79 |
lft x1l=hround 1.5u; rt x2r=hround(.5w+.25u+.5vair); |
| 80 |
top y1=h; bot y2=vround 2/3[h,x_height]; |
| 81 |
filldraw stroke z1e--z2e; fi % diagonal |
| 82 |
penlabels(1,2); .endchar; |
| 83 |
|
| 84 |
.cmchar "Acute accent"; |
| 85 |
.beginchar(oct"023",9u#,min(asc_height#,2x_height#),0); |
| 86 |
italcorr h#*slant-if serifs: 1.5 fi u#; |
| 87 |
.adjust_fit(0,0); |
| 88 |
if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1]; |
| 89 |
y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair); |
| 90 |
numeric theta; theta=angle(z2-z1)+90; |
| 91 |
pos1(stem,theta); pos2(hair,theta); |
| 92 |
filldraw circ_stroke z1e--z2e; % diagonal |
| 93 |
else: pickup fine.nib; pos1(stem,0); pos2(vair,0); |
| 94 |
rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair); |
| 95 |
top y1=h; bot y2=vround 2/3[h,x_height]; |
| 96 |
filldraw stroke z1e--z2e; fi % diagonal |
| 97 |
penlabels(1,2); .endchar; |
| 98 |
|
| 99 |
.cmchar "Hachek (check) accent"; |
| 100 |
.beginchar(oct"024",9u#,.75[x_height#,min(asc_height#,2x_height#)],0); |
| 101 |
h':=vround min(asc_height,2x_height); % height of circumflex being inverted |
| 102 |
if serifs: italcorr h#*slant+.5hair#-1.75u#; |
| 103 |
.adjust_fit(0,0); |
| 104 |
pickup crisp.nib; pos2'(.5[vair,curve],90); top y2'r=h; |
| 105 |
pos2(.5[vair,curve],90); x2=.5w; |
| 106 |
x1=w-x3=good.x 2.25u; top y1=top y3=h; y1-y2=.5(y2'-x_height); |
| 107 |
pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90); |
| 108 |
filldraw stroke z1e--z2e--z3e; % diagonals |
| 109 |
else: italcorr h#*slant-.5stem#+.5vair#-.75u#; |
| 110 |
.adjust_fit(0,0); |
| 111 |
pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3; |
| 112 |
pos2(stem,0); bot y2=vround(1/12[x_height,h']+o); x2=.5w; |
| 113 |
top y1=top y3=h+o; lft x1l=hround(rt x2r-3.25u-.5vair); |
| 114 |
z0=whatever[z1r,z2r]=whatever[z2l,z3l]; |
| 115 |
y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l; |
| 116 |
filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi % diagonals |
| 117 |
penlabels(0,1,2,3,4); .endchar; |
| 118 |
|
| 119 |
.cmchar "Breve accent"; |
| 120 |
.beginchar(oct"025",9u#,min(asc_height#,2x_height#),0); |
| 121 |
italcorr h#*slant+.5vair#-1.5u#; |
| 122 |
.adjust_fit(0,0); |
| 123 |
pickup crisp.nib; pos1(vair,-180); pos3(vair,0); |
| 124 |
top y1=top y3=h; lft x1r=w-rt x3r=hround(2u-.5vair); |
| 125 |
numeric mid_thickness; mid_thickness=vround 1/3[vair,stem]; |
| 126 |
pos2(mid_thickness,-90); x2=.5w; |
| 127 |
bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness); |
| 128 |
filldraw stroke z1e{down}...z2e{right}...{up}z3e; % stroke |
| 129 |
penlabels(1,2,3); .endchar; |
| 130 |
|
| 131 |
.cmchar "Macron (bar) accent"; |
| 132 |
numeric macron_breadth#; macron_breadth#=.2[vair#,stem#]; |
| 133 |
.beginchar(oct"026",6u#,.4[x_height#,asc_height#]+macron_breadth#,0); |
| 134 |
italcorr h#*slant-.75u#; |
| 135 |
.adjust_fit(0,0); |
| 136 |
numeric macron_breadth; macron_breadth:=Vround .2[vair,stem]; |
| 137 |
pickup if serifs: crisp.nib else: fine.nib fi; |
| 138 |
pos1(2/3stem,70); pos2(2/3stem,70); |
| 139 |
top y1r=top y2r=h+o; lft x1r=w-rt x2l=hround 1.25u; |
| 140 |
filldraw stroke z1e--z2e; % bar |
| 141 |
penlabels(1,2); .endchar; |
| 142 |
|
| 143 |
.cmchar "Cedilla accent"; |
| 144 |
.beginchar(oct"030",8u#,0,.875desc_depth#); |
| 145 |
.adjust_fit(0,0); |
| 146 |
x1=.5w+.5u; |
| 147 |
if serifs: pickup crisp.nib; pos1(eps,0); pos2(stem,0); |
| 148 |
pos3(vair,90); pos4(stem,0); pos5(vair,-90); |
| 149 |
x1=x2; z3l=z2l; x4=x2+1.5u; x5=x3-1.5u; |
| 150 |
bot y1=-o; bot y2=-vround 2/7d-o; y4=.5[y3,y5]; bot y5=-d-o; |
| 151 |
filldraw stroke z1e--z2e; % stem |
| 152 |
filldraw stroke z3e{right}...z4e{down}...{left}z5e; % hook |
| 153 |
else: pickup fine.nib; pos1(vair,0); top y1=-o-2; |
| 154 |
pos2(.5[vair,stem],0); bot y2=-d-o; x2=x1-1.25u; |
| 155 |
filldraw stroke z1e--z2e; fi % diagonal |
| 156 |
penlabels(1,2,3,4,5); .endchar; |
| 157 |
|
| 158 |
.cmchar "Circumflex (hat) accent"; |
| 159 |
.beginchar(oct"136",9u#,min(asc_height#,2x_height#),0); |
| 160 |
if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#; |
| 161 |
.adjust_fit(0,0); |
| 162 |
pickup crisp.nib; pos2(.5[vair,curve],90); top y2r=h; x2=.5w; |
| 163 |
x1=w-x3=good.x 2.25u; y1=y3=.5[x_height,y2]; |
| 164 |
pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90); |
| 165 |
filldraw stroke z1e--z2e--z3e; % diagonals |
| 166 |
else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#; |
| 167 |
.adjust_fit(0,0); |
| 168 |
pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3; |
| 169 |
pos2(stem,0); top y2=h; x2=.5w; bot y1=bot y3=vround 2/3[h,x_height]-eps; |
| 170 |
lft x1l=hround(rt x2r-3.25u-.5vair); % same slope as in the acute accent |
| 171 |
z0=whatever[z1r,z2r]=whatever[z2l,z3l]; |
| 172 |
y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l; |
| 173 |
filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi % diagonals |
| 174 |
penlabels(0,1,2,3,4); .endchar; |
| 175 |
|
| 176 |
iff ligs>0: .cmchar "Dot accent"; |
| 177 |
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#); |
| 178 |
.beginchar(oct"137",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0); |
| 179 |
define_whole_blacker_pixels(dot_diam); |
| 180 |
italcorr h#*slant+.5dot_diam#-2u#; |
| 181 |
.adjust_fit(0,0); |
| 182 |
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90); |
| 183 |
x1=x2=.5w; top y2r=h+1; |
| 184 |
if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi |
| 185 |
y1=.5[y2l,y2r]; dot(1,2); % dot |
| 186 |
penlabels(1,2); .endchar; |
| 187 |
|
| 188 |
iff ligs>0: .cmchar "Long Hungarian umlaut accent"; |
| 189 |
.beginchar(oct"175",9u#,min(asc_height#,2x_height#),0); |
| 190 |
italcorr h#*slant-u#; |
| 191 |
.adjust_fit(0,0); |
| 192 |
x3-x1=x4-x2=hround 3u; y3=y1; y4=y2; |
| 193 |
if serifs: pickup crisp.nib; x3+.5stem=hround(w-1.5u); x2=2.5u; |
| 194 |
y1+.5stem=h; y2=max(2/3[h,x_height],x_height+o+hair); |
| 195 |
numeric theta; theta=angle(z2-z1)+90; |
| 196 |
pos1(stem,theta); pos2(hair,theta); |
| 197 |
pos3(stem,theta); pos4(hair,theta); |
| 198 |
filldraw circ_stroke z1e--z2e; % left diagonal |
| 199 |
filldraw circ_stroke z3e--z4e; % right diagonal |
| 200 |
else: pickup fine.nib; pos1(stem,0); pos2(vair,0); |
| 201 |
pos3(stem,0); pos4(vair,0); |
| 202 |
rt x3r=hround(w-1.5u); lft x4l=hround(.5w+u-.5vair); |
| 203 |
top y1=h; bot y2=vround 2/3[h,x_height]; |
| 204 |
filldraw stroke z1e--z2e; % left diagonal |
| 205 |
filldraw stroke z3e--z4e; fi % right diagonal |
| 206 |
penlabels(1,2,3,4); .endchar; |
| 207 |
|
| 208 |
.cmchar "Tilde (squiggle) accent"; |
| 209 |
.beginchar(oct"176",9u#,min(asc_height#,10/7x_height#+.5dot_size#),0); |
| 210 |
italcorr h#*slant-u#; |
| 211 |
.adjust_fit(0,0); |
| 212 |
if serifs: numeric theta; theta=angle(1/6(6u-vair),1/4(h-x_height)); |
| 213 |
pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem]; |
| 214 |
pos1(vair,theta+90); pos2(vair,theta+90); |
| 215 |
pos3(vair,theta+90); pos4(vair,theta+90); |
| 216 |
z2-z1=z4-z3=(mid_width-crisp)*dir theta; |
| 217 |
lft x1r=w-rt x4l=hround 1.5u; top y4r=h; |
| 218 |
bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r); |
| 219 |
pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta; |
| 220 |
filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l |
| 221 |
--z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle; % stroke |
| 222 |
else: pickup fine.nib; pos1(vair,180); pos2(vair,90); |
| 223 |
pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180); |
| 224 |
lft x1r=w-rt x5l=hround 1.5u; x2-x1=x3-x2=x4-x3=x5-x4; |
| 225 |
bot y1=bot y4l=vround(.75[x_height,h]-vair); |
| 226 |
top y2r=top y5=h; y3=.5[y2,y4]; |
| 227 |
filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke |
| 228 |
penlabels(1,2,3,4,5); .endchar; |
| 229 |
|
| 230 |
.cmchar "Opening Gaensefuesschen"; |
| 231 |
.beginchar(oct"134",9u#,asc_height#,0); |
| 232 |
italcorr asc_height#*slant+dot_size#-4.1u#; |
| 233 |
.adjust_fit(0,0); |
| 234 |
x2+.5dot_size=hround(w-.6u); y2-.5dot_size=0; |
| 235 |
x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1; |
| 236 |
comma(1,a,dot_size,.25u,comma_depth); % left dot and tail |
| 237 |
comma(2,b,dot_size,.25u,comma_depth); % right dot and tail |
| 238 |
penlabels(1,2); .endchar; |
| 239 |
|
| 240 |
|
| 241 |
.cmchar "Closing Gaensefuesschen"; |
| 242 |
.beginchar(oct"042",9u#,asc_height#,0); |
| 243 |
italcorr asc_height#*slant-.1u#; |
| 244 |
.adjust_fit(0,0); |
| 245 |
x1-.5dot_size=hround .6u; |
| 246 |
y1+.5dot_size=h-comma_depth; |
| 247 |
x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1; |
| 248 |
ammoc(1,a,dot_size,.25u,comma_depth); % left dot and tail |
| 249 |
ammoc(2,b,dot_size,.25u,comma_depth); % right dot and tail |
| 250 |
penlabels(1,2); |
| 251 |
.endchar; |
| 252 |
|
| 253 |
.cmchar "En dash"; |
| 254 |
.beginchar(oct"173",9u#,x_height#,0); |
| 255 |
italcorr .61803x_height#*slant+.5u#; |
| 256 |
.adjust_fit(0,0); |
| 257 |
pickup crisp.nib; pos1(vair,90); pos2(vair,90); |
| 258 |
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps; |
| 259 |
filldraw stroke z1e--z2e; % bar |
| 260 |
penlabels(1,2); .endchar; |
| 261 |
|
| 262 |
.cmchar "Em dash"; |
| 263 |
.beginchar(oct"174",18u#,x_height#,0); |
| 264 |
italcorr .61803x_height#*slant+.5u#; |
| 265 |
.adjust_fit(letter_fit#,letter_fit#); |
| 266 |
pickup crisp.nib; pos1(vair,90); pos2(vair,90); |
| 267 |
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps; |
| 268 |
filldraw stroke z1e--z2e; % bar |
| 269 |
penlabels(1,2); .endchar; |
| 270 |
|
| 271 |
.cmchar "Hash mark (number sign)"; |
| 272 |
if monospace: compute_spread(.6x_height#,.7x_height#); |
| 273 |
else: compute_spread(.45x_height#,.55x_height#); fi |
| 274 |
.beginchar("#",15u#,asc_height#,asc_depth#); |
| 275 |
italcorr (math_axis#+.5(spread#+rule_thickness#))*slant-.5u#; |
| 276 |
.adjust_fit(0,0); |
| 277 |
pickup rule.nib; lft x1=hround u-eps; x3=x1; x2=x4=w-x1; |
| 278 |
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; |
| 279 |
draw z1--z2; % upper bar |
| 280 |
draw z3--z4; % lower bar |
| 281 |
lft x6=hround 3u; rt x7=hround(w-3u); x5-x6=x7-x8; |
| 282 |
x8=good.x if monospace: .6 else: .5 fi\\w; |
| 283 |
top y5=top y7=h+eps; bot y6=bot y8=-d-eps; |
| 284 |
y15=y1; z15=whatever[z5,z6]; y36=y3; z36=whatever[z5,z6]; |
| 285 |
y27=y2; z27=whatever[z7,z8]; y48=y4; z48=whatever[z7,z8]; |
| 286 |
draw z5--if x5>x6+1:(good.x(x15+.5),y1)--(good.x(x15-.5),y1) |
| 287 |
--(good.x(x36+.5),y3)--(good.x(x36-.5),y3)--fi\\z6; % left diagonal |
| 288 |
draw z7--if x7>x8+1:(good.x(x27+.5),y2)--(good.x(x27-.5),y2) |
| 289 |
--(good.x(x48+.5),y4)--(good.x(x48-.5),y4)--fi\\z8; % right diagonal |
| 290 |
labels(1,2,3,4,5,6,7,8,15,27,36,48); .endchar; |
| 291 |
|
| 292 |
.cmchar "Per cent sign"; |
| 293 |
.beginchar("%",15u#, |
| 294 |
body_height#,body_height#-asc_height#); |
| 295 |
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; |
| 296 |
.adjust_fit(0,0); pickup fine.nib; |
| 297 |
numeric left_curve,right_curve; |
| 298 |
left_curve=hround 5/6[fudged.hair,fudged.stem]; |
| 299 |
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); |
| 300 |
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360); |
| 301 |
top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u); |
| 302 |
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height); |
| 303 |
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; |
| 304 |
filldraw stroke pulled_super_arc.e(1,2)(superpull) |
| 305 |
& pulled_super_arc.e(2,3)(superpull); % left half of upper bowl |
| 306 |
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl |
| 307 |
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360); |
| 308 |
bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u); |
| 309 |
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height); |
| 310 |
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7]; |
| 311 |
filldraw stroke pulled_super_arc.e(5,6)(superpull) |
| 312 |
& pulled_super_arc.e(6,7)(superpull); % left half of lower bowl |
| 313 |
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl |
| 314 |
pickup rule.nib; top y9=h; bot y10=-d; |
| 315 |
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps); |
| 316 |
draw z9--z10; % diagonal |
| 317 |
else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10; % diagonal |
| 318 |
pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90); |
| 319 |
pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90); |
| 320 |
path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r; |
| 321 |
filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi % link |
| 322 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); .endchar; |
| 323 |
|
| 324 |
.cmchar "Apostrophe"; |
| 325 |
.beginchar("'",5u#,asc_height#,0); |
| 326 |
italcorr asc_height#*slant+.5dot_size#-2u#; |
| 327 |
.adjust_fit(0,0); |
| 328 |
x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h; |
| 329 |
if monospace: comma(1,a,dot_size,.28u,vround 1.5comma_depth); % large comma |
| 330 |
else: comma(1,a,dot_size,.25u,comma_depth); fi % comma with increased jut |
| 331 |
penlabels(1); .endchar; |
| 332 |
|
| 333 |
.cmchar "Left parenthesis"; |
| 334 |
.beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#); |
| 335 |
italcorr body_height#*slant-.5u#; |
| 336 |
.adjust_fit(0,0); pickup fine.nib; |
| 337 |
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); |
| 338 |
rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi); |
| 339 |
top y1=h; y2=.5[y1,y3]=math_axis; |
| 340 |
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e |
| 341 |
...{3(x3e-x2e),y3-y2}z3e; % arc |
| 342 |
penlabels(1,2,3); .endchar; |
| 343 |
|
| 344 |
.cmchar "Right parenthesis"; |
| 345 |
.beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#); |
| 346 |
italcorr math_axis#*slant-.5u#; |
| 347 |
.adjust_fit(0,0); pickup fine.nib; |
| 348 |
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); |
| 349 |
lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi); |
| 350 |
top y1=h; y2=.5[y1,y3]=math_axis; |
| 351 |
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e |
| 352 |
...{3(x3e-x2e),y3-y2}z3e; % arc |
| 353 |
penlabels(1,2,3); .endchar; |
| 354 |
|
| 355 |
.cmchar "Asterisk"; |
| 356 |
.beginchar("*",9u#, |
| 357 |
if low_asterisk:math_axis#+.5x_height# else: body_height# fi,0); |
| 358 |
italcorr h#*slant-.75u#; |
| 359 |
.adjust_fit(0,0); |
| 360 |
numeric ast_flare; ast_flare=hround .7[thin_join,stem]; |
| 361 |
x0=.5w; y0=h-.5x_height; |
| 362 |
for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height; |
| 363 |
numeric theta; theta=angle(z[d]-z0); |
| 364 |
fill z0+.5(0,-thin_join)rotated theta |
| 365 |
---z[d]+.5(-ast_flare,-ast_flare)rotated theta |
| 366 |
..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta |
| 367 |
---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| |
| 368 |
labels(0,[-150],[-90],[-30],30,90,150); .endchar; |
| 369 |
|
| 370 |
.cmchar "Plus sign"; |
| 371 |
beginarithchar("+"); pickup rule.nib; |
| 372 |
x1=x2=good.x .5w; top y1=h+eps; .5[y1,y2]=math_axis; |
| 373 |
lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis; |
| 374 |
draw z1--z2; % stem |
| 375 |
draw z3--z4; % crossbar |
| 376 |
labels(1,2,3,4); .endchar; |
| 377 |
|
| 378 |
.cmchar "Virgule (slash)"; |
| 379 |
.beginchar("/",9u#,body_height#,paren_depth#); |
| 380 |
italcorr body_height#*slant-.5u#; |
| 381 |
.adjust_fit(0,0); pickup rule.nib; |
| 382 |
rt x1=hround(w-u)+eps; top y1=h+eps; |
| 383 |
lft x2=hround u-eps; bot y2=-d-eps; |
| 384 |
draw z1--z2; % diagonal |
| 385 |
penlabels(1,2); .endchar; |
| 386 |
|
| 387 |
.cmchar "Equals sign"; |
| 388 |
compute_spread(.45x_height#,.55x_height#); |
| 389 |
.beginchar("=",14u#,v_center(spread#+rule_thickness#)); |
| 390 |
italcorr h#*slant-.5u#; |
| 391 |
.adjust_fit(0,0); pickup rule.nib; |
| 392 |
lft x1=hround u-eps; x3=x1; x2=x4=w-x1; |
| 393 |
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; |
| 394 |
draw z1--z2; % upper bar |
| 395 |
draw z3--z4; % lower bar |
| 396 |
labels(1,2,3,4); .endchar; |
| 397 |
|
| 398 |
.cmchar "Left bracket"; |
| 399 |
numeric wd#; wd#=max(5u#,6u#); |
| 400 |
.beginchar("[",wd#,body_height#,paren_depth#); |
| 401 |
italcorr body_height#*slant; |
| 402 |
.adjust_fit(0,0); |
| 403 |
numeric top_thickness,side_thickness; |
| 404 |
if hefty: top_thickness=vair; |
| 405 |
side_thickness=max(crisp.breadth,stem-2stem_corr); |
| 406 |
else: top_thickness=side_thickness=rule_thickness; fi; |
| 407 |
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); |
| 408 |
top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps; |
| 409 |
filldraw stroke z1e--z2e; % stem |
| 410 |
pos3(top_thickness,90); pos4(top_thickness,90); |
| 411 |
pos5(top_thickness,90); pos6(top_thickness,90); |
| 412 |
x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2; |
| 413 |
filldraw stroke z3e--z4e; % upper bar |
| 414 |
filldraw stroke z5e--z6e; % lower bar |
| 415 |
penlabels(1,2,3,4,5,6); .endchar; |
| 416 |
|
| 417 |
.cmchar "Right bracket"; |
| 418 |
numeric wd#; wd#=max(5u#,6u#); |
| 419 |
.beginchar("]",wd#,body_height#,paren_depth#); |
| 420 |
italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi; |
| 421 |
.adjust_fit(0,0); |
| 422 |
numeric top_thickness,side_thickness; |
| 423 |
if hefty: top_thickness=vair; |
| 424 |
side_thickness=max(crisp.breadth,stem-2stem_corr); |
| 425 |
else: top_thickness=side_thickness=rule_thickness; fi; |
| 426 |
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); |
| 427 |
top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps; |
| 428 |
filldraw stroke z1e--z2e; % stem |
| 429 |
pos3(top_thickness,90); pos4(top_thickness,90); |
| 430 |
pos5(top_thickness,90); pos6(top_thickness,90); |
| 431 |
x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2; |
| 432 |
filldraw stroke z3e--z4e; % upper bar |
| 433 |
filldraw stroke z5e--z6e; % lower bar |
| 434 |
penlabels(1,2,3,4,5,6); .endchar; |
| 435 |
|
| 436 |
.cmchar "Reverse apostrophe"; |
| 437 |
.beginchar("`",5u#,asc_height#,0); |
| 438 |
italcorr asc_height#*slant+.5dot_size#-2u#; |
| 439 |
.adjust_fit(0,0); |
| 440 |
x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h-comma_depth; |
| 441 |
if monospace: ammoc(1,a,dot_size,.28u,vround 1.5comma_depth); % large ammoc |
| 442 |
else: ammoc(1,a,dot_size,.25u,comma_depth); fi % normal ammoc |
| 443 |
penlabels(1); .endchar; |
| 444 |
|
| 445 |
cmchar "Exclamation point"; |
| 446 |
beginchar("!",5u#,asc_height#,0); |
| 447 |
italcorr asc_height#*slant-2u#-.5width_adj#+.5dot_size#; |
| 448 |
adjust_fit(0,0); |
| 449 |
pointpoint; |
| 450 |
pickup tiny.nib; pos103(dot_size,0); pos104(dot_size,90); |
| 451 |
lft x103l=hround(.5w-.5dot_size); bot y104l=0; z103=z104; % dot |
| 452 |
numeric bot_width; |
| 453 |
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; |
| 454 |
pickup fine.nib; pos101(dot_size,0); pos102(bot_width,0); |
| 455 |
x101=x102=x103; bot y102=.25[top y104r,x_height]+1; |
| 456 |
if square_dots: top y101=h; |
| 457 |
filldraw stroke z101e--z102e; % stem |
| 458 |
else: top z100=(x101,h+o); y101+.5dot_size=h+o; |
| 459 |
filldraw z101r...z100...z101l---z102l--z102r---cycle; fi % stem and bulb |
| 460 |
penlabels(0,1,2,3,4); endchar; |
| 461 |
|
| 462 |
cmchar "Question mark"; |
| 463 |
beginchar("?",8.5u#,asc_height#,0); |
| 464 |
italcorr .8asc_height#*slant; |
| 465 |
adjust_fit(0,0); |
| 466 |
pointpoint; |
| 467 |
pickup tiny.nib; pos107(dot_size,0); pos108(dot_size,90); |
| 468 |
lft x107l=hround(.5w-.25u-.5dot_size); bot y108l=0; z107=z108; % dot |
| 469 |
numeric bot_width; |
| 470 |
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; |
| 471 |
pickup fine.nib; pos102(vair,90); pos103(curve,0); |
| 472 |
pos104(vair,-90); pos105(bot_width,0); pos106(bot_width,0); |
| 473 |
x102=x104=x105=x106=x107; rt x103r=hround(w-u); bot y106=1+.25[top y108r,x_height]; |
| 474 |
top y102r=h+oo; y103=.75[y106,y102]; y104=.5[y106,y102]; y105=.1[y106,y102]; |
| 475 |
{{interim superness:=more_super; |
| 476 |
filldraw stroke pulled_super_arc.e(102,103)(superpull) |
| 477 |
& subpath (0,1) of super_arc.e(103,104) .. z105e---z106e\\}}; % arc and stem |
| 478 |
if serifs: pos101(hair,180); pos100(flare,180); |
| 479 |
lft x101r=hround u; y101=y103; bulb(102,101,100); % bulb |
| 480 |
else: pos101(Vround 5/7[vair,flare],110); |
| 481 |
lft x101r=hround u; top y101r=vround .9[y106,top y102r]; |
| 482 |
filldraw stroke term.e(102,101,left,101,104); fi % terminal |
| 483 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 484 |
|
| 485 |
|
| 486 |
cmchar "Ampersand"; |
| 487 |
beginchar("&",14u#,asc_height#,0); |
| 488 |
italcorr x_height#*slant-serif_fit# - if serifs: .4u# else: 1.5u# fi; |
| 489 |
adjust_fit(0,serif_fit#); |
| 490 |
pickup tiny.nib; pos2(slab,-90); x2=4u; bot y2r=-o; |
| 491 |
if not hefty:(x,y2l)=whatever[z2r,(w-5u,x_height)]; x2l:=x; fi |
| 492 |
if serifs: pos0(fudged.hair,0); |
| 493 |
rt x0r+jut=hround(w-.9u); top y0=x_height; |
| 494 |
pos1(fudged.hair,0); z1=whatever[z0,(.6[x0,x2],0)]; |
| 495 |
y1=max(y0-1.5bracket-.2x_height,2/3x_height); |
| 496 |
filldraw stroke z0e---z1e...{left}z2e; % short diagonal |
| 497 |
else: pickup fine.nib; pos1(.25[slab,flare],-15); rt x1r=hround(w-2u); |
| 498 |
y1r=good.y .75[bar_height,x_height]; x1l:=good.x x1l; y1l:=good.y y1l; |
| 499 |
top z2'l=(x2l,tiny.top y2l); bot z2'r=(x2r,tiny.bot y2r); |
| 500 |
filldraw stroke term.e(2',1,right,1,4); fi % short diagonal and terminal |
| 501 |
pickup tiny.nib; numeric slope,theta,reduced_hair; |
| 502 |
slope=(h-2vair-slab)/10.5u; theta=angle(-slope,1); |
| 503 |
reduced_hair=max(tiny.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); |
| 504 |
lft x3r=hround .75u; x5=.5[x3r,x6l]; lft x6r=hround .5(w-u); |
| 505 |
x3l-x3r=curve-tiny; pos6(reduced_hair,180); |
| 506 |
pos5(vair,theta); y5=.5h; |
| 507 |
ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r); |
| 508 |
pos7(vair,270); top y7l=h+o; x7=.45[x6r,x8r]; |
| 509 |
pos8(fudged.stem,30); x8l=good.x(x8l+3.5u-x8); y8r=y6; |
| 510 |
ellipse_set(7l,6l,5',5l); |
| 511 |
filldraw stroke z2e{left}...z3e{up}...z4e---z5e...{up}z6e |
| 512 |
...z7e{left}...z8e{down}; % bowls |
| 513 |
pos10(slab,90); x10=w-3.5u; bot y10l=-o; |
| 514 |
pos9(fudged.stem,angle(z8-z10)-90); |
| 515 |
z9=.5[z8,z10]+(1.75u,0) rotated(angle(z8-z10)+90); |
| 516 |
filldraw stroke z8e{down}...z9e{z10-z8}...{right}z10e; % long diagonal |
| 517 |
if serifs: pickup crisp.nib; pos10'(slab,90); z10'=z10; |
| 518 |
pos11(fudged.hair,180); rt x11l=hround(w-u); y11=.5bar_height; |
| 519 |
filldraw stroke z10'e{right}...{up}z11e; % terminal |
| 520 |
numeric inner_jut; if rt x6l+.5u<lft x0l-1.5jut: inner_jut=1.5jut; |
| 521 |
else: rt x6l+.5u=lft x0l-inner_jut; fi |
| 522 |
dish_serif(0,1,a,.6,inner_jut,b,.5,jut)(dark); % serif |
| 523 |
else: pickup fine.nib; pos10'(slab,90); z10'=z10; |
| 524 |
pos11(Vround .5[slab,flare],90); |
| 525 |
rt x11=hround(r-letter_fit-u); bot y11l=vround .07bar_height-o; |
| 526 |
filldraw stroke term.e(10',11,right,1,4); fi % terminal |
| 527 |
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; |
| 528 |
|