| 1 |
%% filename: cyrpunc.mf |
| 2 |
%% version: 2.2 |
| 3 |
%% date: 1995/01/04 |
| 4 |
%% |
| 5 |
%% American Mathematical Society |
| 6 |
%% Technical Support |
| 7 |
%% Publications Technical Group |
| 8 |
%% 201 Charles Street |
| 9 |
%% Providence, RI 02904 |
| 10 |
%% USA |
| 11 |
%% tel: (401) 455-4080 |
| 12 |
%% (800) 321-4267 (USA and Canada only) |
| 13 |
%% fax: (401) 331-3842 |
| 14 |
%% email: [email protected] |
| 15 |
%% |
| 16 |
%% Copyright 1995 Humanities and Arts Computing Center, University of |
| 17 |
%% Washington. |
| 18 |
%% |
| 19 |
%% Unlimited copying and redistribution of this file are permitted as |
| 20 |
%% long as this file is not modified. Modifications, and distribution |
| 21 |
%% of modified versions, are permitted, but only if the resulting file |
| 22 |
%% is renamed. |
| 23 |
%% |
| 24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 25 |
% cyrpunc punctuation and digits for cyrillic |
| 26 |
|
| 27 |
cmchar "Exclamation point"; |
| 28 |
beginchar("!",5u#+width_adj#,asc_height#,0); |
| 29 |
italcorr asc_height#*slant-2u#-.5width_adj#+.5dot_size#; |
| 30 |
adjust_fit(0,0); |
| 31 |
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90); |
| 32 |
lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4); % dot |
| 33 |
numeric bot_width; |
| 34 |
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; |
| 35 |
pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0); |
| 36 |
x1=x2=x3; bot y2=.25[top y4r,x_height]+1; |
| 37 |
if square_dots: top y1=h; |
| 38 |
filldraw stroke z1e--z2e; % stem |
| 39 |
else: top z0=(x1,h+o); y1+.5dot_size=h+o; |
| 40 |
filldraw z1r...z0...z1l---z2l--z2r---cycle; fi % stem and bulb |
| 41 |
penlabels(0,1,2,3,4); endchar; |
| 42 |
|
| 43 |
cmchar "Per cent sign"; |
| 44 |
beginchar("%",9u#+max(6u#,2fudge*(hair#+stem#)), |
| 45 |
body_height#,body_height#-asc_height#); |
| 46 |
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; |
| 47 |
adjust_fit(0,0); pickup fine.nib; |
| 48 |
numeric left_curve,right_curve; |
| 49 |
left_curve=hround 5/6[fudged.hair,fudged.stem]; |
| 50 |
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); |
| 51 |
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360); |
| 52 |
top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u); |
| 53 |
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height); |
| 54 |
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; |
| 55 |
filldraw stroke pulled_super_arc.e(1,2)(superpull) |
| 56 |
& pulled_super_arc.e(2,3)(superpull); % left half of upper bowl |
| 57 |
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl |
| 58 |
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360); |
| 59 |
bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u); |
| 60 |
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height); |
| 61 |
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7]; |
| 62 |
filldraw stroke pulled_super_arc.e(5,6)(superpull) |
| 63 |
& pulled_super_arc.e(6,7)(superpull); % left half of lower bowl |
| 64 |
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl |
| 65 |
pickup rule.nib; top y9=h; bot y10=-d; |
| 66 |
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps); |
| 67 |
draw z9--z10; % diagonal |
| 68 |
else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10; % diagonal |
| 69 |
pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90); |
| 70 |
pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90); |
| 71 |
path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r; |
| 72 |
filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi % link |
| 73 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 74 |
|
| 75 |
cmchar "Apostrophe"; |
| 76 |
beginchar("'",5u#,asc_height#,0); |
| 77 |
italcorr asc_height#*slant+.5dot_size#-2u#; |
| 78 |
adjust_fit(0,0); |
| 79 |
x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h; |
| 80 |
if monospace: comma(1,a,dot_size,.28u,vround 1.5comma_depth); % large comma |
| 81 |
else: comma(1,a,dot_size,.25u,comma_depth); fi % comma with increased jut |
| 82 |
penlabels(1); endchar; |
| 83 |
|
| 84 |
cmchar "Left parenthesis"; |
| 85 |
beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#); |
| 86 |
italcorr body_height#*slant-.5u#; |
| 87 |
adjust_fit(0,0); pickup fine.nib; |
| 88 |
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); |
| 89 |
rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi); |
| 90 |
top y1=h; y2=.5[y1,y3]=math_axis; |
| 91 |
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e |
| 92 |
...{3(x3e-x2e),y3-y2}z3e; % arc |
| 93 |
penlabels(1,2,3); endchar; |
| 94 |
|
| 95 |
cmchar "Right parenthesis"; |
| 96 |
beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#); |
| 97 |
italcorr math_axis#*slant-.5u#; |
| 98 |
adjust_fit(0,0); pickup fine.nib; |
| 99 |
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); |
| 100 |
lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi); |
| 101 |
top y1=h; y2=.5[y1,y3]=math_axis; |
| 102 |
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e |
| 103 |
...{3(x3e-x2e),y3-y2}z3e; % arc |
| 104 |
penlabels(1,2,3); endchar; |
| 105 |
|
| 106 |
cmchar "Asterisk"; |
| 107 |
beginchar("*",9u#, |
| 108 |
if low_asterisk:math_axis#+.5x_height# else: body_height# fi,0); |
| 109 |
italcorr h#*slant-.75u#; |
| 110 |
adjust_fit(0,0); |
| 111 |
numeric ast_flare; ast_flare=hround .7[thin_join,stem]; |
| 112 |
x0=.5w; y0=h-.5x_height; |
| 113 |
for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height; |
| 114 |
numeric theta; theta=angle(z[d]-z0); |
| 115 |
fill z0+.5(0,-thin_join)rotated theta |
| 116 |
---z[d]+.5(-ast_flare,-ast_flare)rotated theta |
| 117 |
..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta |
| 118 |
---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| |
| 119 |
labels(0,[-150],[-90],[-30],30,90,150); endchar; |
| 120 |
|
| 121 |
cmchar "Comma"; |
| 122 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 123 |
define_whole_blacker_pixels(dot_diam); |
| 124 |
beginchar(",",5u#,dot_diam#,comma_depth#); |
| 125 |
adjust_fit(0,0); |
| 126 |
x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0; |
| 127 |
comma(1,a,dot_diam,.2u,comma_depth); % dot and tail |
| 128 |
penlabels(1); endchar; |
| 129 |
|
| 130 |
cmchar "Hyphen"; |
| 131 |
beginchar("-",6u#,x_height#,0); |
| 132 |
italcorr .5x_height#*slant-.5u#; |
| 133 |
adjust_fit(0,0); |
| 134 |
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi; |
| 135 |
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90); |
| 136 |
top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps; |
| 137 |
if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi; |
| 138 |
filldraw stroke z1e--z2e; % bar |
| 139 |
penlabels(1,2); endchar; |
| 140 |
|
| 141 |
cmchar "Period"; |
| 142 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 143 |
define_whole_blacker_pixels(dot_diam); |
| 144 |
beginchar(".",5u#,dot_diam#,0); |
| 145 |
adjust_fit(0,0); pickup fine.nib; |
| 146 |
pos1(dot_diam,0); pos2(dot_diam,90); |
| 147 |
lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2); % dot |
| 148 |
penlabels(1,2); endchar; |
| 149 |
|
| 150 |
cmchar "Virgule (slash)"; |
| 151 |
beginchar("/",9u#,body_height#,paren_depth#); |
| 152 |
italcorr body_height#*slant-.5u#; |
| 153 |
adjust_fit(0,0); pickup rule.nib; |
| 154 |
rt x1=hround(w-u)+eps; top y1=h+eps; |
| 155 |
lft x2=hround u-eps; bot y2=-d-eps; |
| 156 |
draw z1--z2; % diagonal |
| 157 |
penlabels(1,2); endchar; |
| 158 |
|
| 159 |
cmchar "Colon"; |
| 160 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 161 |
define_whole_blacker_pixels(dot_diam); |
| 162 |
beginchar(":",5u#,x_height#,0); |
| 163 |
italcorr x_height#*slant+.5dot_diam#-2u#; |
| 164 |
adjust_fit(0,0); pickup fine.nib; |
| 165 |
pos1(dot_diam,0); pos2(dot_diam,90); |
| 166 |
lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot |
| 167 |
pos3(dot_diam,0); pos4(dot_diam,90); |
| 168 |
x3=x1; bot y4l=0; z3=z4; dot(3,4); % lower dot |
| 169 |
penlabels(1,2,3,4); endchar; |
| 170 |
|
| 171 |
cmchar "Semicolon"; |
| 172 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 173 |
define_whole_blacker_pixels(dot_diam); |
| 174 |
beginchar(";",5u#,x_height#,comma_depth#); |
| 175 |
italcorr x_height#*slant+.5dot_diam#-2u#; |
| 176 |
adjust_fit(0,0); pickup fine.nib; |
| 177 |
pos1(dot_diam,0); pos2(dot_diam,90); |
| 178 |
lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot |
| 179 |
x3-.5dot_diam=hround(.5w-.5dot_diam); y3-.5dot_diam=0; |
| 180 |
comma(3,a,dot_diam,.05u,comma_depth); % lower dot and tail |
| 181 |
penlabels(1,2,3); endchar; |
| 182 |
|
| 183 |
cmchar "Question mark"; |
| 184 |
beginchar("?",8.5u#,asc_height#,0); |
| 185 |
italcorr .8asc_height#*slant; |
| 186 |
adjust_fit(0,0); |
| 187 |
pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90); |
| 188 |
lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; dot(7,8); % dot |
| 189 |
numeric bot_width; |
| 190 |
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; |
| 191 |
pickup fine.nib; pos2(vair,90); pos3(curve,0); |
| 192 |
pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0); |
| 193 |
x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height]; |
| 194 |
top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2]; |
| 195 |
{{interim superness:=more_super; |
| 196 |
filldraw stroke pulled_super_arc.e(2,3)(superpull) |
| 197 |
& subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}}; % arc and stem |
| 198 |
if serifs: pos1(hair,180); pos0(flare,180); |
| 199 |
lft x1r=hround u; y1=y3; bulb(2,1,0); % bulb |
| 200 |
else: pos1(Vround 5/7[vair,flare],110); |
| 201 |
lft x1r=hround u; top y1r=vround .9[y6,top y2r]; |
| 202 |
filldraw stroke term.e(2,1,left,1,4); fi % terminal |
| 203 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 204 |
|
| 205 |
cmchar "Left bracket"; |
| 206 |
numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); |
| 207 |
beginchar("[",wd#,body_height#,paren_depth#); |
| 208 |
italcorr body_height#*slant; |
| 209 |
adjust_fit(0,0); |
| 210 |
numeric top_thickness,side_thickness; |
| 211 |
if hefty: top_thickness=vair; |
| 212 |
side_thickness=max(crisp.breadth,stem-2stem_corr); |
| 213 |
else: top_thickness=side_thickness=rule_thickness; fi; |
| 214 |
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); |
| 215 |
top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps; |
| 216 |
filldraw stroke z1e--z2e; % stem |
| 217 |
pos3(top_thickness,90); pos4(top_thickness,90); |
| 218 |
pos5(top_thickness,90); pos6(top_thickness,90); |
| 219 |
x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2; |
| 220 |
filldraw stroke z3e--z4e; % upper bar |
| 221 |
filldraw stroke z5e--z6e; % lower bar |
| 222 |
penlabels(1,2,3,4,5,6); endchar; |
| 223 |
|
| 224 |
cmchar "Right bracket"; |
| 225 |
numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); |
| 226 |
beginchar("]",wd#,body_height#,paren_depth#); |
| 227 |
italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi; |
| 228 |
adjust_fit(0,0); |
| 229 |
numeric top_thickness,side_thickness; |
| 230 |
if hefty: top_thickness=vair; |
| 231 |
side_thickness=max(crisp.breadth,stem-2stem_corr); |
| 232 |
else: top_thickness=side_thickness=rule_thickness; fi; |
| 233 |
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); |
| 234 |
top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps; |
| 235 |
filldraw stroke z1e--z2e; % stem |
| 236 |
pos3(top_thickness,90); pos4(top_thickness,90); |
| 237 |
pos5(top_thickness,90); pos6(top_thickness,90); |
| 238 |
x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2; |
| 239 |
filldraw stroke z3e--z4e; % upper bar |
| 240 |
filldraw stroke z5e--z6e; % lower bar |
| 241 |
penlabels(1,2,3,4,5,6); endchar; |
| 242 |
|
| 243 |
cmchar "Reverse apostrophe"; |
| 244 |
beginchar("`",5u#,asc_height#,0); |
| 245 |
italcorr asc_height#*slant+.5dot_size#-2u#; |
| 246 |
adjust_fit(0,0); |
| 247 |
x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h-comma_depth; |
| 248 |
if monospace: ammoc(1,a,dot_size,.28u,vround 1.5comma_depth); % large ammoc |
| 249 |
else: ammoc(1,a,dot_size,.25u,comma_depth); fi % normal ammoc |
| 250 |
penlabels(1); endchar; |
| 251 |
|
| 252 |
cmchar "The numeral 0"; |
| 253 |
beginchar("0",9u#,fig_height#,0); |
| 254 |
italcorr fig_height#*slant-.5u#; |
| 255 |
adjust_fit(0,0); |
| 256 |
penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0); |
| 257 |
if not monospace: interim superness:=sqrt(more_super*hein_super); fi |
| 258 |
x2r=hround max(.7u,1.45u-.5curve); x4r=w-x2r; x1=x3=.5w; |
| 259 |
y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; |
| 260 |
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) |
| 261 |
& pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl |
| 262 |
penlabels(1,2,3,4); endchar; |
| 263 |
|
| 264 |
cmchar "The numeral 1"; |
| 265 |
beginchar("1",9u#,fig_height#,0); |
| 266 |
italcorr fig_height#*slant-.5u#; |
| 267 |
adjust_fit(0,0); |
| 268 |
numeric light_stem; light_stem=hround .4[stem',cap_stem']; |
| 269 |
pickup tiny.nib; |
| 270 |
pos1(light_stem,0); pos2(light_stem,0); |
| 271 |
lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+o; bot y2=0; |
| 272 |
filldraw stroke z1e--z2e; % stem |
| 273 |
if not serifs: save slab; slab=bar; fi |
| 274 |
dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), |
| 275 |
b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif |
| 276 |
pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); |
| 277 |
top y3l=h+o; top y4l=if monospace: .8 else: .9 fi\\ h+o; |
| 278 |
lft x4=max(1.25u,tiny.lft x1l-2.35u); |
| 279 |
tiny.rt x1r=lft x3+.25[tiny,hair]; |
| 280 |
erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} |
| 281 |
--(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top |
| 282 |
filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left}; % point |
| 283 |
penlabels(1,2,3,4); endchar; |
| 284 |
|
| 285 |
cmchar "The numeral 2"; |
| 286 |
beginchar("2",9u#,fig_height#,0); |
| 287 |
italcorr fig_height#*slant-.5u#; |
| 288 |
adjust_fit(0,0); |
| 289 |
numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair]; |
| 290 |
arm_thickness=Vround(if hefty:slab+2stem_corr else:.4[stem,cap_stem] fi); |
| 291 |
pickup crisp.nib; pos7(arm_thickness,-90); pos8(hair,0); |
| 292 |
bot y7r=0; lft x7=hround .9u; rt x8r=hround(w-.9u); y8=good.y(y7l+beak/2)+eps; |
| 293 |
arm(7,8,a,.3beak_darkness,beak_jut); % arm and beak |
| 294 |
pickup fine.nib; pos2(slab,90); pos3(.4[curve,cap_curve],0); |
| 295 |
top y2r=h+o; x2=.5(w-.5u); rt x3r=hround(w-.9u); y3+.5vair=.75h; |
| 296 |
if serifs: numeric bulb_diam; bulb_diam=hround(flare+2/3(cap_stem-stem)); |
| 297 |
pos0(bulb_diam,180); pos1(cap_hair,180); |
| 298 |
lft x1r=hround .9u; y1-.5bulb_diam=2/3h; |
| 299 |
(x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0); % bulb and arc |
| 300 |
else: x2l:=x2l-.25u; pos1(flare,angle(-9u,h)); |
| 301 |
lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r+eps; x1l:=good.x x1l; |
| 302 |
filldraw stroke term.e(2,1,left,.9,4); fi % terminal and arc |
| 303 |
pos4(.25[hair_vair,cap_stem],0); |
| 304 |
pos5(hair_vair,0); pos6(hair_vair,0); |
| 305 |
y5=arm_thickness; y4=.3[y5,y3]; top y6=min(y5,slab,top y7l); |
| 306 |
lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58h)]; z5l=whatever[z6l,z4l]; |
| 307 |
erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle; % erase excess at left |
| 308 |
filldraw stroke z2e{right}..tension atleast .9 and atleast 1 |
| 309 |
..z3e{down}.. z4e---z5e--z6e; % stroke |
| 310 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 311 |
|
| 312 |
cmchar "The numeral 3"; |
| 313 |
beginchar("3",9u#,fig_height#,0); |
| 314 |
italcorr fig_height#*slant-.5u#; |
| 315 |
adjust_fit(0,0); |
| 316 |
numeric top_thickness,mid_thickness,bot_thickness; |
| 317 |
top_thickness=max(fine.breadth,vround(slab-2vair_corr)); |
| 318 |
mid_thickness=max(fine.breadth,vround 2/3vair); |
| 319 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 320 |
pickup fine.nib; pos2(top_thickness,90); top y2r=h+o; |
| 321 |
pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0); |
| 322 |
rt x3r=hround(w-1.25u); |
| 323 |
pos4(vair,-90); pos5(vair,-90); |
| 324 |
pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7]; |
| 325 |
pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6)-eps; |
| 326 |
pos8(bot_thickness,-90); bot y8r=-o; |
| 327 |
y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l]; |
| 328 |
top y5l=vround(.54h+.5vair); y5r=y6l; |
| 329 |
x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h); |
| 330 |
filldraw stroke pulled_super_arc.e(2,3)(.5superpull) |
| 331 |
& z3e{down}...z4e---z5e; % upper bowl |
| 332 |
filldraw z5r--z6l--z6r--z5l---cycle; % middle tip |
| 333 |
filldraw stroke pulled_super_arc.e(6,7)(.5superpull) |
| 334 |
& pulled_super_arc.e(7,8)(.5superpull); % lower bowl |
| 335 |
if serifs: numeric bulb_diam[]; |
| 336 |
bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem; |
| 337 |
pos0(bulb_diam1,180); pos1(hair,180); |
| 338 |
lft x0r=hround 1.25u; y0=min(.9h-.5bulb_diam1,.75h+.5bulb_diam1); |
| 339 |
bulb(2,1,0); % upper bulb |
| 340 |
pos10(bulb_diam2,-180); pos9(cap_hair,-180); |
| 341 |
lft x10r=hround .75u; y10=max(.1h+.5bulb_diam2,.3h-.5bulb_diam2); |
| 342 |
bulb(8,9,10); % lower bulb |
| 343 |
else: pos1(.5[vair,flare],angle(-8u,h)); |
| 344 |
lft x1r=hround u; bot y1l=vround .75h+o; |
| 345 |
y1r:=good.y y1r+eps; x1l:=good.x x1l; |
| 346 |
pos9(bot_thickness,angle(-2u,-h)); |
| 347 |
lft x9r=hround .75u; top y9l=vround .25h-o; |
| 348 |
y9r:=good.y y9r-eps; x9l:=good.x x9l; |
| 349 |
filldraw stroke term.e(2,1,left,1,4); % upper terminal |
| 350 |
filldraw stroke term.e(8,9,left,1,4); fi % lower terminal |
| 351 |
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; |
| 352 |
|
| 353 |
cmchar "The numeral 4"; |
| 354 |
beginchar("4",9u#,fig_height#,0); |
| 355 |
italcorr fig_height#*slant-.5u#; |
| 356 |
adjust_fit(0,0); |
| 357 |
numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut; |
| 358 |
light_stem=hround .4[fudged.stem,fudged.cap_stem]; |
| 359 |
light_stem'=hround max(tiny.breadth,light_stem-2stem_corr); |
| 360 |
diag_stem=max(tiny.breadth,.4[vair,fudged.hair]); |
| 361 |
pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90); |
| 362 |
lft x5=hround .5u; rt x6=hround(w-.5u); |
| 363 |
top y5r=vround(if serifs: 5/18[slab,h-light_stem]+1 |
| 364 |
else:.35(h-light_stem) fi+.5cap_bar); |
| 365 |
z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem); |
| 366 |
penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=h+apex_o+apex_oo; |
| 367 |
x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l); |
| 368 |
penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0); |
| 369 |
x0=x1l; z0=whatever[z3r,z4r]; |
| 370 |
x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l]; |
| 371 |
fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5' |
| 372 |
---lft z5l -- (x4r,y5l) -- z4r |
| 373 |
if y0<h-cut:{z3r-z4r}...{up}(x1l-1,h-cut) |
| 374 |
--(x1l,h-cut) else: -- z0 fi |
| 375 |
--z2l--z2r--cycle; % diagonal and upper stem |
| 376 |
filldraw stroke z5e--z6e; % bar |
| 377 |
pickup tiny.nib; pos7(light_stem,0); rt x7r=x1r; bot y7=0; |
| 378 |
pos2'(light_stem,0); x2'=x7; |
| 379 |
filldraw stroke z2'e--z7e; % lower stem |
| 380 |
if serifs: dish_serif(7,2',a,1/3,1.75u, |
| 381 |
b,1/3,min(1.75u,w-.5u-rt x7r)); fi % serif |
| 382 |
penlabels(0,1,2,3,4,5,6,7); endchar; |
| 383 |
|
| 384 |
cmchar "The numeral 5"; |
| 385 |
beginchar("5",9u#,fig_height#,0); |
| 386 |
italcorr fig_height#*slant-.5u#; |
| 387 |
adjust_fit(0,0); |
| 388 |
numeric bot_thickness,light_hair; |
| 389 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 390 |
light_hair=hround(cap_hair if hefty: -\\2stem_corr fi); |
| 391 |
pickup tiny.nib; pos5(vair,180); pos6(vair,90); |
| 392 |
bot y5=vround(.53h-vair); top y6r=max(vround .61803h+o,top y6r+y5+eps-y6l); |
| 393 |
pos3(light_hair,0); pos4(light_hair,0); |
| 394 |
lft x3l=max(1.35u,2.1u-.5light_hair); x3=x4=x5; y4=y5; |
| 395 |
top y3=h if not hefty: +\\o fi; |
| 396 |
filldraw stroke z3e--z4e; % thin stem |
| 397 |
penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90); |
| 398 |
fine.rt x7r=hround(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7]; |
| 399 |
erase fill z5--bot z5--(x6,bot y5)--z6{left} |
| 400 |
..tension .9 and 1..{x5-x6,3(y5-y6)}cycle; % erase excess in middle |
| 401 |
filldraw stroke z6e{left}..tension .9 and 1..{x5-x6,3(y5-y6)}z5e; % link |
| 402 |
pickup fine.nib; pos6'(vair,90); z6'=z6; |
| 403 |
y7=.5[y6,y8]; bot y8r=-o; |
| 404 |
filldraw stroke pulled_arc.e(6',7) & pulled_arc.e(7,8); % bowl |
| 405 |
if serifs: pos9(hair,-180); y9=.5y5; lft x9r=hround .9u; |
| 406 |
pos10(flare+1/3(cap_stem-stem),-180); bulb(8,9,10); % bulb |
| 407 |
else: pos9(3/7[bot_thickness,flare],angle(-7u,-h)); |
| 408 |
lft x9r=hround(tiny.lft x3l-.75u); bot y9r=vround .15h-o; |
| 409 |
x9l:=good.x x9l; y9l:=good.y y9l; |
| 410 |
filldraw stroke term.e(8,9,left,1,4); fi % terminal |
| 411 |
if hefty: pickup crisp.nib; pos1(slab,90); pos2(hair,0); |
| 412 |
top y1r=h; x1=x4; rt x2r=hround(w-1.5u); y2=y1l-eps; |
| 413 |
arm(1,2,a,0,0); % arm |
| 414 |
else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve]; |
| 415 |
pos1(flag_breadth,90); pos2(flag_breadth,60); |
| 416 |
pos0(vair,90); top y1r=tiny.top y3; top y2r=vround .95h+o; y0r=y1r; |
| 417 |
lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=hround(w-1.6u); |
| 418 |
erase fill top z1r--z1r...{right}z2r |
| 419 |
--(x2r,top y1r)--cycle; % erase excess at top |
| 420 |
filldraw stroke z1e...{right}z2e...z0e; fi % flag |
| 421 |
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; |
| 422 |
|
| 423 |
cmchar "The numeral 6"; |
| 424 |
beginchar("6",9u#,fig_height#,0); |
| 425 |
italcorr fig_height#*slant-.5u#; |
| 426 |
adjust_fit(0,0); |
| 427 |
numeric top_thickness,bot_thickness,side_thickness,pull; |
| 428 |
top_thickness=max(fine.breadth,vround(slab-2vair_corr)); |
| 429 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 430 |
side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); |
| 431 |
pull=min(.25,1.5superpull); |
| 432 |
pickup fine.nib; pos2(top_thickness,-270); |
| 433 |
pos3(side_thickness,-180); pos4(bot_thickness,-90); |
| 434 |
pos5(side_thickness,0); pos6(vair,90); |
| 435 |
lft x3r=w-rt x5r=hround max(.75u,1.5u-.5side_thickness); |
| 436 |
x4=x6-.1u=x2-u=.5w; |
| 437 |
top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o; |
| 438 |
y5=.5[y4,y6]; top y6=vround 5/8h+o; |
| 439 |
path p; p=pulled_super_arc.l(3,4)(pull); |
| 440 |
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); |
| 441 |
pos7(thin_join,180); z7l=point t of p; |
| 442 |
(x,y6r)=whatever[z7l,z6l]; x6r:=min(x,.5[x5r,x6]); |
| 443 |
filldraw stroke pulled_super_arc.e(2,3)(pull) |
| 444 |
& {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} |
| 445 |
& {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} |
| 446 |
& z6e{left}...{direction t of p}z7e; % arc and bowl |
| 447 |
if serifs: pos1(hair,-360); pos0(flare,-360); |
| 448 |
rt x0r=max(rt x2+eps,hround(w-1.2u)); |
| 449 |
y0=vround min(.9h-.5flare,.85h+.5flare)+o; |
| 450 |
{{less_tense; bulb(2,1,0)}}; % arc and bulb |
| 451 |
else: pos1(vround .1[top_thickness,flare],90); |
| 452 |
top y1r=vround .97h+o; rt x1=hround(x5-.5); |
| 453 |
filldraw stroke term.e(2,1,right,.9,4); fi % terminal |
| 454 |
penlabels(0,1,2,3,4,5,6,7); endchar; |
| 455 |
|
| 456 |
cmchar "The numeral 7"; |
| 457 |
beginchar("7",9u#,fig_height#,0); |
| 458 |
italcorr fig_height#*slant-.5u#; |
| 459 |
adjust_fit(0,0); |
| 460 |
numeric arm_thickness, bot_width, top_shift, top_hair; |
| 461 |
if hefty: arm_thickness=Vround(slab+2stem_corr); top_shift=0; |
| 462 |
bot_width=hround .51[curve,cap_curve]; top_hair=.4[thin_join,bot_width]; |
| 463 |
else: arm_thickness=Vround .4[stem,cap_stem]; top_shift=.5u; |
| 464 |
bot_width=flare; top_hair=cap_hair; fi |
| 465 |
if top_hair<tiny.breadth: top_hair:=tiny.breadth; fi |
| 466 |
pickup crisp.nib; pos2(arm_thickness,90); pos1(hair,180); |
| 467 |
top y2r=h; rt x2=hround(w-.75u+top_shift); |
| 468 |
lft x1r=hround(.75u+.5top_shift); y1=good.y(y2l-beak/2)-eps; |
| 469 |
arm(2,1,a,.3beak_darkness,-beak_jut); % arm and beak |
| 470 |
pos3(hair,180); y3=good.y(y2r+beak/6)+eps; z3r=whatever[z1r,z.a0]; |
| 471 |
penpos2'(eps,-90); z2'=z2r; |
| 472 |
arm(2',3,b,beak_darkness,x3r-x.a0); % upward extension of beak |
| 473 |
pickup tiny.nib; pos4(top_hair,0); pos6(bot_width,0); |
| 474 |
bot y4=max(h-arm_thickness,h-slab,bot y2l); rt x4r=crisp.rt x2; |
| 475 |
lft x6l=hround(3.5u+top_shift-.5bot_width); |
| 476 |
if serifs: y6-.5bot_width=-o; filldraw z6l{down}..{up}z6r--cycle; % bulb |
| 477 |
else: bot y6=-oo; fi |
| 478 |
if hefty: erase fill rt z4r--z4r...{down}z6r |
| 479 |
--(rt x4r,y6)--cycle; % erase excess at top |
| 480 |
filldraw stroke z4e...{down}z6e; % stroke |
| 481 |
else: pos5(top_hair,0); y5=2/3h; z5=whatever[z4,(.75u,y6)]; |
| 482 |
erase fill rt z4r--z4r--z5r--(rt x4r,y5)--cycle; % erase excess at top |
| 483 |
filldraw stroke z4e---z5e...{down}z6e; fi % stroke |
| 484 |
penlabels(1,2,3,4,5,6); endchar; |
| 485 |
|
| 486 |
cmchar "The numeral 8"; |
| 487 |
beginchar("8",9u#,fig_height#,0); |
| 488 |
italcorr fig_height#*slant-.5u#; |
| 489 |
adjust_fit(0,0); |
| 490 |
numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta; |
| 491 |
top_thickness=max(fine.breadth,vround(slab-2vair_corr)); |
| 492 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 493 |
x0=.5w; y0=.54h; |
| 494 |
if hefty: mid_thickness=vround 2/3vair; upper_side=hround(stem-3stem_corr); |
| 495 |
lower_side=hround min(.5[curve,cap_curve]-stem_corr,upper_side+.25u); |
| 496 |
penpos1(top_thickness,90); penpos2(upper_side,180); |
| 497 |
penpos3(mid_thickness,270); penpos8(upper_side,360); |
| 498 |
penpos4(mid_thickness,90); penpos7(lower_side,180); |
| 499 |
penpos6(bot_thickness,270); penpos5(lower_side,360); |
| 500 |
penpos0(vair,90); z3l=z0r; z4l=z0l; |
| 501 |
x1=x6=.5w; x2r=w-x8r=hround u; x7r=w-x5r=hround .75u; |
| 502 |
top y1r=h+o; bot y6r=-o; y2=y8=.5[y1l,y3l]; y7=y5=.5[y4l,y6l]; |
| 503 |
filldraw stroke pulled_arc.e(1,2) |
| 504 |
& pulled_arc.e(2,3); % left half of upper bowl |
| 505 |
filldraw stroke pulled_arc.e(4,5) |
| 506 |
& pulled_arc.e(5,6); % right half of lower bowl |
| 507 |
filldraw stroke pulled_arc.e(6,7) |
| 508 |
& pulled_arc.e(7,4); % left half of lower bowl |
| 509 |
filldraw stroke pulled_arc.e(3,8) |
| 510 |
& pulled_arc.e(8,1); % right half of upper bowl |
| 511 |
else: pickup fine.nib; theta=90-angle(18u,h); slope:=-h/18u; |
| 512 |
upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr)); |
| 513 |
lower_side=hround(.5[hair,stem]+stem_corr); |
| 514 |
pos1(top_thickness,-90); pos6(bot_thickness,-90); |
| 515 |
x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(cap_stem,theta); |
| 516 |
lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround .75u; |
| 517 |
x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine; |
| 518 |
ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r); |
| 519 |
ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r); |
| 520 |
numeric tau; tau=max(.8,.20710678/(superness-.5)); |
| 521 |
filldraw stroke z1e{left}..tension atleast tau..z2e{down} |
| 522 |
..z3e---z4e..z5e{down}..tension atleast tau..z6e{left}; % S stroke |
| 523 |
pos7(lower_side,180); pos8(upper_side,180); |
| 524 |
y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0; |
| 525 |
filldraw stroke z1e{right}..tension atleast tau..z8e{down} |
| 526 |
..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke |
| 527 |
filldraw stroke z6e{left}..tension atleast tau..z7e{up} |
| 528 |
..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke |
| 529 |
penlabels(0,1,2,3,4,5,6,7,8,9); endchar; |
| 530 |
|
| 531 |
cmchar "The numeral 9"; |
| 532 |
beginchar("9",9u#,fig_height#,0); |
| 533 |
italcorr fig_height#*slant-.5u#; |
| 534 |
adjust_fit(0,0); |
| 535 |
numeric top_thickness,bot_thickness,side_thickness,pull; |
| 536 |
top_thickness=max(fine.breadth,vround(slab-2vair_corr)); |
| 537 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 538 |
side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); |
| 539 |
pull=min(.25,1.5superpull); |
| 540 |
pickup fine.nib; pos2(bot_thickness,-90); |
| 541 |
pos3(side_thickness,0); pos4(top_thickness,90); |
| 542 |
pos5(side_thickness,180); pos6(vair,270); |
| 543 |
w-rt x3r=lft x5r=hround max(.75u,1.5u-.5side_thickness); |
| 544 |
x4-.1u=x6+.1u=x2+.75u=.5w; |
| 545 |
bot y2r=-o; y3=.5[y2,y4]; top y4r=h+o; |
| 546 |
y5=.5[y4,y6]; bot y6=vround 3/8h-o; |
| 547 |
path p; p=pulled_super_arc.l(3,4)(pull); |
| 548 |
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); |
| 549 |
pos7(thin_join,360); z7l=point t of p; |
| 550 |
(x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); |
| 551 |
filldraw stroke pulled_super_arc.e(2,3)(pull) |
| 552 |
& {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} |
| 553 |
& {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} |
| 554 |
& z6e{right}...{direction t of p}z7e; % arc and bowl |
| 555 |
if serifs: pos1(hair,-180); pos0(flare,-180); |
| 556 |
lft x0r=min(lft x2-eps,hround 1.2u); |
| 557 |
y0=vround max(.1h+.5flare,.15h-.5flare)-o; |
| 558 |
{{less_tense; bulb(2,1,0)}}; % arc and bulb |
| 559 |
else: pos1(.1[bot_thickness,flare],-120); |
| 560 |
bot y1r=vround .07h-o; lft x1r=hround 1.3u; |
| 561 |
filldraw stroke term.e(2,1,left,.9,4); fi % terminal |
| 562 |
penlabels(0,1,2,3,4,5,6,7); endchar; |
| 563 |
|
| 564 |
cmchar "Umlaut (double dot) accent"; |
| 565 |
numeric dot_diam#,dot_diam; |
| 566 |
dot_diam#=max(dot_size#,cap_curve#); |
| 567 |
beginchar(oct"040",9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0); |
| 568 |
dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr)); |
| 569 |
italcorr h#*slant+.5dot_diam#-2.25u#; |
| 570 |
adjust_fit(0,0); |
| 571 |
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90); |
| 572 |
x1=x2=2.75u; top y2r=h+1; |
| 573 |
if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi |
| 574 |
y1=.5[y2l,y2r]; dot(1,2); % left dot |
| 575 |
pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1; |
| 576 |
dot(3,4); % right dot |
| 577 |
penlabels(1,2,3,4); endchar; |
| 578 |
|
| 579 |
cmchar "Closing quotes"; |
| 580 |
beginchar(oct"042",7u#+max(2u#,dot_size#),asc_height#,0); |
| 581 |
italcorr asc_height#*slant+dot_size#-4.1u#; |
| 582 |
adjust_fit(0,0); |
| 583 |
x1-.5dot_size=hround .6u; y2+.5dot_size=h; |
| 584 |
x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1; |
| 585 |
comma(1,a,dot_size,.25u,comma_depth); % left dot and tail |
| 586 |
comma(2,b,dot_size,.25u,comma_depth); % right dot and tail |
| 587 |
penlabels(1,2); endchar; |
| 588 |
|
| 589 |
cmchar "Cyrillic breve"; |
| 590 |
beginchar(oct"044",8u#,x_height#+1.75dot_size#,0); |
| 591 |
italcorr h#*slant+.5vair#-1.5u#; |
| 592 |
adjust_fit(0,0); |
| 593 |
pickup crisp.nib; pos1(vair,-180); pos3(vair,0); |
| 594 |
top y1=top y3=h; lft x1r=hround(.5u-.5vair); rt x3r=hround(w-.5u+.5vair); |
| 595 |
numeric mid_thickness; mid_thickness=vround 1/3[vair,stem]; |
| 596 |
pos2(mid_thickness,-90); x2=.5w; |
| 597 |
bot y2r=vround(x_height+.5dot_size); |
| 598 |
filldraw stroke z1e{down}...z2e{right}...{up}z3e; % stroke |
| 599 |
pos11(dot_size,0); pos12(dot_size,90); pos13(dot_size,0); pos14(dot_size,90); |
| 600 |
lft x11l=lft x1r; rt x13r=rt x3r; y11=y12=y13=y14=h; |
| 601 |
x12=x11; x14=x13; dot(11,12); |
| 602 |
% ngb changes: |
| 603 |
if altaccent: % relax |
| 604 |
else: dot(13,14); fi |
| 605 |
penlabels(1,2,3,11,13); endchar; |
| 606 |
|
| 607 |
%cmchar "Cyrillic breve"; |
| 608 |
%beginchar(oct"044",9u#,min(asc_height#,2x_height#),0); |
| 609 |
%italcorr h#*slant+.5vair#-1.5u#; |
| 610 |
%adjust_fit(0,0); |
| 611 |
%pickup crisp.nib; pos1(vair,-180); pos3(vair,0); |
| 612 |
%top y1=top y3=h; lft x1r=hround(.5w-4u-.5vair); rt x3r=hround(.5w+4u+.5vair); |
| 613 |
%numeric mid_thickness; mid_thickness=vround 1/3[vair,stem]; |
| 614 |
%pos2(mid_thickness,-90); x2=.5w; |
| 615 |
%bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness); |
| 616 |
%filldraw stroke z1e{down}...z2e{right}...{up}z3e; % stroke |
| 617 |
%pos11(dot_size,0); pos12(dot_size,90); pos13(dot_size,0); pos14(dot_size,90); |
| 618 |
%lft x11l=lft x1r; rt x13r=rt x3r; y11=y12=y13=y14=h; |
| 619 |
%x12=x11; x14=x13; dot(11,12); dot(13,14); |
| 620 |
%penlabels(1,2,3,11,13); endchar; |
| 621 |
|
| 622 |
cmchar "Acute accent"; |
| 623 |
beginchar(oct"046",9u#,min(asc_height#,2x_height#),0); |
| 624 |
italcorr h#*slant-if serifs: 1.5 fi u#; |
| 625 |
adjust_fit(0,0); |
| 626 |
if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1]; |
| 627 |
y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair); |
| 628 |
numeric theta; theta=angle(z2-z1)+90; |
| 629 |
pos1(stem,theta); pos2(hair,theta); |
| 630 |
filldraw circ_stroke z1e--z2e; % diagonal |
| 631 |
else: pickup fine.nib; pos1(stem,0); pos2(vair,0); |
| 632 |
rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair); |
| 633 |
top y1=h; bot y2=vround 2/3[h,x_height]; |
| 634 |
filldraw stroke z1e--z2e; fi % diagonal |
| 635 |
penlabels(1,2); endchar; |
| 636 |
|
| 637 |
cmchar "open cyrillic quote (looks like <<)"; |
| 638 |
beginchar(oct"074",10u#,x_height#,0); |
| 639 |
adjust_fit(if monospace:-u#,-u# else: 0,0 fi); pickup rule.nib; |
| 640 |
lft x2=hround u-epsilon; x1=x3=.55w; |
| 641 |
y1=h; y3=0; y2=.5[y1,y3]; |
| 642 |
draw z1--z2--z3; % left diagonals |
| 643 |
x4=w-x2; y4=.9[y3,y1]; y6=.1[y3,y1]; |
| 644 |
x5-x2=x6-x3=x4-x1; y5=y2; |
| 645 |
draw z4--z5--z6; % right diagonals |
| 646 |
z2'=z2; x2':=x2-.625rule_thickness; |
| 647 |
z5'=z5; x5':=x5+.625rule_thickness; |
| 648 |
draw z1--z2'--z3; % left diagonals |
| 649 |
draw z4--z5'--z6; % right diagonals |
| 650 |
labels(1,2,3,4,5,6); endchar; |
| 651 |
|
| 652 |
cmchar "close cyrillic quote (looks like >>)"; |
| 653 |
beginchar(oct"076",10u#,x_height#,0); |
| 654 |
adjust_fit(if monospace:-u#,-u# else: 0,0 fi); pickup rule.nib; |
| 655 |
%lft x2=.55w; x1=x3=hround u-epsilon; |
| 656 |
%y1=.9h; y3=.1h; y2=.5[y1,y3]; |
| 657 |
%y4=h; y6=0; y5=.5[y4,y6]; |
| 658 |
%draw z1--z2--z3; % left diagonals |
| 659 |
%x4=w-x2; |
| 660 |
%x5-x2=x6-x3=x4-x1; |
| 661 |
%draw z4--z5--z6; % right diagonals |
| 662 |
%z2'=z2; x2':=x2-.625rule_thickness; |
| 663 |
%z5'=z5; x5':=x5+.625rule_thickness; |
| 664 |
%draw z1--z2'--z3; % left diagonals |
| 665 |
%draw z4--z5'--z6; % right diagonals |
| 666 |
%labels(1,2,3,4,5,6); |
| 667 |
slantswitch; |
| 668 |
pickup rule.nib; |
| 669 |
lft x2=hround u-epsilon; x1=x3=.55w; |
| 670 |
y1=h; y3=0; y2=.5[y1,y3]; |
| 671 |
draw z1--z2--z3; % left diagonals |
| 672 |
x4=w-x2; y4=.9[y3,y1]; y6=.1[y3,y1]; |
| 673 |
x5-x2=x6-x3=x4-x1; y5=y2; |
| 674 |
draw z4--z5--z6; % right diagonals |
| 675 |
z2'=z2; x2':=x2-.625rule_thickness; |
| 676 |
z5'=z5; x5':=x5+.625rule_thickness; |
| 677 |
draw z1--z2'--z3; % left diagonals |
| 678 |
draw z4--z5'--z6; % right diagonals |
| 679 |
mirror(.5w); |
| 680 |
endchar; |
| 681 |
|
| 682 |
cmchar "Breve accent"; |
| 683 |
beginchar(oct"100",9u#,min(asc_height#,2x_height#),0); |
| 684 |
italcorr h#*slant+.5vair#-1.5u#; |
| 685 |
adjust_fit(0,0); |
| 686 |
pickup crisp.nib; pos1(vair,-180); pos3(vair,0); |
| 687 |
top y1=top y3=h; lft x1r=w-rt x3r=hround(2u-.5vair); |
| 688 |
numeric mid_thickness; mid_thickness=vround 1/3[vair,stem]; |
| 689 |
pos2(mid_thickness,-90); x2=.5w; |
| 690 |
bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness); |
| 691 |
filldraw stroke z1e{down}...z2e{right}...{up}z3e; % stroke |
| 692 |
penlabels(1,2,3); endchar; |
| 693 |
|
| 694 |
cmchar "Opening quotes"; |
| 695 |
beginchar(oct"134",7u#+max(2u#,dot_size#),asc_height#,0); |
| 696 |
italcorr asc_height#*slant-.1u#; |
| 697 |
adjust_fit(0,0); |
| 698 |
x2+.5dot_size=hround(w-.6u); y1+.5dot_size=h-comma_depth; |
| 699 |
x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1; |
| 700 |
ammoc(1,a,dot_size,.25u,comma_depth); % left dot and tail |
| 701 |
ammoc(2,b,dot_size,.25u,comma_depth); % right dot and tail |
| 702 |
penlabels(1,2); endchar; |
| 703 |
|
| 704 |
cmchar "En dash"; |
| 705 |
beginchar(oct"173",9u#,x_height#,0); |
| 706 |
italcorr .61803x_height#*slant+.5u#; |
| 707 |
adjust_fit(0,0); |
| 708 |
pickup crisp.nib; pos1(vair,90); pos2(vair,90); |
| 709 |
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps; |
| 710 |
filldraw stroke z1e--z2e; % bar |
| 711 |
penlabels(1,2); endchar; |
| 712 |
|
| 713 |
cmchar "Em dash"; |
| 714 |
beginchar(oct"174",18u#,x_height#,0); |
| 715 |
italcorr .61803x_height#*slant+.5u#; |
| 716 |
adjust_fit(letter_fit#,letter_fit#); |
| 717 |
pickup crisp.nib; pos1(vair,90); pos2(vair,90); |
| 718 |
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps; |
| 719 |
filldraw stroke z1e--z2e; % bar |
| 720 |
penlabels(1,2); endchar; |
| 721 |
|
| 722 |
cmchar "The symbol No."; |
| 723 |
beginchar(oct"175",15u#+width_adj#,cap_height#,0); |
| 724 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 725 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); w:=if serifs: 10u else: 11u fi; |
| 726 |
numeric thin_stem; thin_stem=hround(fudged.hair+stem_corr); |
| 727 |
pickup tiny.nib; pos1(thin_stem,0); pos2(thin_stem,0); |
| 728 |
pos3(thin_stem,0); pos4(thin_stem,0); |
| 729 |
pickup tiny.nib; top y1=h; |
| 730 |
if serifs: top y3=.79h; bot y2=.21h; else: top y3=h; bot y2=0; fi |
| 731 |
bot y4=0; |
| 732 |
x1=x2; x3=x4; x1l=w-x3r; |
| 733 |
rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem); |
| 734 |
x91=x2-.75flare; bot y91r=-oo; x92=w-x91; top y92l=h+oo; |
| 735 |
pos91(thin_stem,-90); pos92(thin_stem,-90); |
| 736 |
if serifs: filldraw stroke z1e--z2e & pulled_arc.e(2,91); % left stem |
| 737 |
filldraw stroke z4e--z3e & pulled_arc.e(3,92); % right stem |
| 738 |
else: filldraw stroke z1e--z2e; filldraw stroke z4e--z3e; |
| 739 |
fi |
| 740 |
if hefty: penpos5(fudged.cap_stem,0); penpos6(fudged.cap_stem,0); |
| 741 |
x5l=x1; x6r=x4; y5=h; y6=0; |
| 742 |
numeric upper_notch,lower_notch; |
| 743 |
upper_notch=h-cap_notch_cut; lower_notch=cap_notch_cut; |
| 744 |
x1'=rt x1r; z1'=whatever[z5l,z6l]; x4'=lft x4l; z4'=whatever[z5r,z6r]; |
| 745 |
fill z5l.. |
| 746 |
if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi |
| 747 |
{z6-z5}diag_in(5l,6l,1,6r)--z6r.. |
| 748 |
if y4'>lower_notch: {left}(x4'-1,lower_notch){up}... fi |
| 749 |
{z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal |
| 750 |
else: penpos5(whatever,0); penpos6(whatever,90); |
| 751 |
z5l=z1l; z6l=z4l; |
| 752 |
z7=z6l+(max(eps,cap_stem-3stem_corr-tiny),0) rotated (angle(z5l-z6l)-90); |
| 753 |
z5r=z7+whatever*(z5l-z6l); z6r=z7+whatever*(z5l-z6l); |
| 754 |
filldraw stroke z5e..z6e; fi % diagonal |
| 755 |
if serifs: if hefty: serif(1,2,a,1/3,-cap_jut); % upper left serif |
| 756 |
else: serif(5,6,a,1/3,-cap_jut); fi % upper left serif |
| 757 |
fi |
| 758 |
pickup tiny.nib; |
| 759 |
if serifs: |
| 760 |
x93=x2-1.5flare; y93=.75flare; pos95(flare+(cap_stem-stem),-180); |
| 761 |
x94=x3+1.5flare; y94=h-y93; pos96(flare+(cap_stem-stem),0); |
| 762 |
pos92'(thin_stem,90); z92'=z92; |
| 763 |
pos93(cap_hair,-180); pos94(cap_hair,0); bulb(91,93,95); bulb(92',94,96); |
| 764 |
fi |
| 765 |
w:=15u; |
| 766 |
penpos71(vair,90); penpos73(vair',-90); |
| 767 |
penpos72(.8curve,180); penpos74(.8curve,0); |
| 768 |
x72r=hround max(.5u,1.25u-.4curve)+9.5u; |
| 769 |
x74r=w-x72r+9u; x71=x73=12u; y71r=h-3u+vround 1.5oo; y73r=x_height-3u-oo; |
| 770 |
y72=y74=.5[h,x_height]-3u-vair_corr; y72l:=y74l:=.52[h,x_height]-3u; |
| 771 |
penstroke pulled_arc.e(71,72) & pulled_arc.e(72,73) |
| 772 |
& pulled_arc.e(73,74) & pulled_arc.e(74,71) & cycle; % bowl |
| 773 |
x81=lft x72r; x82=rt x74r; y81=y82=.8x_height-3u; pos81(bar,90); pos82(bar,90); |
| 774 |
filldraw stroke z81e--z82e; |
| 775 |
math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,1',2,3,4,4',5,6,7); endchar; |