| 1 |
% This file contains punctuation marks common to roman and italic styles. |
| 2 |
% Modified for the CM Bright fonts [1995/10/23 v0.999 WaS] |
| 3 |
|
| 4 |
% Codes \0041, \0043, \0045, \0047--\0054,\ % |
| 5 |
%% \0056, \0057, \0072, \0073, \0075, \0100,\par |
| 6 |
% \0133, \0135, and \0140 are generated, as well as code |spanish_shriek| |
| 7 |
% (for a Spanish exclamation point) if that code value is known. |
| 8 |
|
| 9 |
cmchar "Exclamation point"; |
| 10 |
beginchar("!",5u#+width_adj#,asc_height#,0); |
| 11 |
italcorr asc_height#*slant-2u#-.5width_adj#+.5dot_size#; |
| 12 |
adjust_fit(0,0); |
| 13 |
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90); |
| 14 |
lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4); % dot |
| 15 |
numeric bot_width; |
| 16 |
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; |
| 17 |
pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0); |
| 18 |
x1=x2=x3; bot y2=.25[top y4r,x_height]+1; |
| 19 |
if square_dots: top y1=h; |
| 20 |
filldraw stroke z1e--z2e; % stem |
| 21 |
else: top z0=(x1,h+o); y1+.5dot_size=h+o; |
| 22 |
filldraw z1r...z0...z1l---z2l--z2r---cycle; fi % stem and bulb |
| 23 |
penlabels(0,1,2,3,4); endchar; |
| 24 |
|
| 25 |
iff known spanish_shriek: cmchar "Spanish open exclamation point"; |
| 26 |
beginchar(spanish_shriek,5u#+width_adj#,asc_height#-desc_depth#,desc_depth#); |
| 27 |
italcorr h#*slant-2u#-.5width_adj#+.5dot_size#; |
| 28 |
adjust_fit(0,0); |
| 29 |
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90); |
| 30 |
lft x3l=hround(.5w-.5dot_size); top y4r=h; z3=z4; dot(3,4); % dot |
| 31 |
numeric top_width; |
| 32 |
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; |
| 33 |
pickup fine.nib; pos1(dot_size,0); pos2(top_width,0); |
| 34 |
x1=x2=x3; top y2=.25[bot y4l,h-x_height]-1; |
| 35 |
if square_dots: bot y1=-d; |
| 36 |
filldraw stroke z1e--z2e; % stem |
| 37 |
else: bot z0=(x1,-d-o); y1-.5dot_size=-d-o; |
| 38 |
filldraw z1l...z0...z1r---z2r--z2l---cycle; fi % stem and bulb |
| 39 |
penlabels(0,1,2,3,4); endchar; |
| 40 |
|
| 41 |
cmchar "Hash mark (number sign)"; |
| 42 |
if monospace: compute_spread(.6x_height#,.7x_height#); |
| 43 |
else: compute_spread(.45x_height#,.55x_height#); fi |
| 44 |
beginchar("#",15u#,asc_height#,asc_depth#); |
| 45 |
italcorr (math_axis#+.5(spread#+rule_thickness#))*slant-.5u#; |
| 46 |
adjust_fit(0,0); |
| 47 |
pickup rule.nib; lft x1=hround u-eps; x3=x1; x2=x4=w-x1; |
| 48 |
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; |
| 49 |
draw z1--z2; % upper bar |
| 50 |
draw z3--z4; % lower bar |
| 51 |
lft x6=hround 3u; rt x7=hround(w-3u); x5-x6=x7-x8; |
| 52 |
x8=good.x if monospace: .6 else: .5 fi\\w; |
| 53 |
top y5=top y7=h+eps; bot y6=bot y8=-d-eps; |
| 54 |
y15=y1; z15=whatever[z5,z6]; y36=y3; z36=whatever[z5,z6]; |
| 55 |
y27=y2; z27=whatever[z7,z8]; y48=y4; z48=whatever[z7,z8]; |
| 56 |
draw z5--if x5>x6+1:(good.x(x15+.5),y1)--(good.x(x15-.5),y1) |
| 57 |
--(good.x(x36+.5),y3)--(good.x(x36-.5),y3)--fi\\z6; % left diagonal |
| 58 |
draw z7--if x7>x8+1:(good.x(x27+.5),y2)--(good.x(x27-.5),y2) |
| 59 |
--(good.x(x48+.5),y4)--(good.x(x48-.5),y4)--fi\\z8; % right diagonal |
| 60 |
labels(1,2,3,4,5,6,7,8,15,27,36,48); endchar; |
| 61 |
|
| 62 |
cmchar "Per cent sign"; |
| 63 |
beginchar("%",9u#+max(6u#,2fudge*(hair#+stem#)), |
| 64 |
body_height#,body_height#-asc_height#); |
| 65 |
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; |
| 66 |
adjust_fit(0,0); pickup fine.nib; |
| 67 |
numeric left_curve,right_curve; |
| 68 |
left_curve=hround 5/6[fudged.hair,fudged.stem]; |
| 69 |
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); |
| 70 |
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360); |
| 71 |
top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u); |
| 72 |
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height); |
| 73 |
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; |
| 74 |
filldraw stroke pulled_super_arc.e(1,2)(superpull) |
| 75 |
& pulled_super_arc.e(2,3)(superpull); % left half of upper bowl |
| 76 |
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl |
| 77 |
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360); |
| 78 |
bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u); |
| 79 |
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height); |
| 80 |
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7]; |
| 81 |
filldraw stroke pulled_super_arc.e(5,6)(superpull) |
| 82 |
& pulled_super_arc.e(6,7)(superpull); % left half of lower bowl |
| 83 |
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl |
| 84 |
pickup rule.nib; top y9=h; bot y10=-d; |
| 85 |
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps); |
| 86 |
draw z9--z10; % diagonal |
| 87 |
else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10; % diagonal |
| 88 |
pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90); |
| 89 |
pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90); |
| 90 |
path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r; |
| 91 |
filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi % link |
| 92 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 93 |
|
| 94 |
cmchar "Apostrophe"; |
| 95 |
beginchar("'",5u#,asc_height#,0); |
| 96 |
italcorr asc_height#*slant+.5dot_size#-2u#; |
| 97 |
adjust_fit(0,0); |
| 98 |
x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h; |
| 99 |
if monospace: comma(1,a,dot_size,.28u,vround 1.5comma_depth); % large comma |
| 100 |
else: comma(1,a,dot_size,.25u,comma_depth); fi % comma with increased jut |
| 101 |
penlabels(1); endchar; |
| 102 |
|
| 103 |
cmchar "Left parenthesis"; |
| 104 |
beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#); |
| 105 |
italcorr body_height#*slant-.5u#; |
| 106 |
adjust_fit(0,0); pickup fine.nib; |
| 107 |
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); |
| 108 |
rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi); |
| 109 |
top y1=h; y2=.5[y1,y3]=math_axis; |
| 110 |
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e |
| 111 |
...{3(x3e-x2e),y3-y2}z3e; % arc |
| 112 |
penlabels(1,2,3); endchar; |
| 113 |
|
| 114 |
cmchar "Right parenthesis"; |
| 115 |
beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#); |
| 116 |
italcorr math_axis#*slant-.5u#; |
| 117 |
adjust_fit(0,0); pickup fine.nib; |
| 118 |
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); |
| 119 |
lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi); |
| 120 |
top y1=h; y2=.5[y1,y3]=math_axis; |
| 121 |
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e |
| 122 |
...{3(x3e-x2e),y3-y2}z3e; % arc |
| 123 |
penlabels(1,2,3); endchar; |
| 124 |
|
| 125 |
cmchar "Asterisk"; |
| 126 |
beginchar("*",9u#, |
| 127 |
if low_asterisk:math_axis#+.5x_height# else: body_height# fi,0); |
| 128 |
italcorr h#*slant-.75u#; |
| 129 |
adjust_fit(0,0); |
| 130 |
numeric ast_flare; ast_flare=hround .7[thin_join,stem]; |
| 131 |
x0=.5w; y0=h-.5x_height; |
| 132 |
for d=-150 step 60 until 150: |
| 133 |
z[d]=z0+.5dir d xscaled 7.5sym_u yscaled sym_height; % (CMBR) |
| 134 |
numeric theta; theta=angle(z[d]-z0); |
| 135 |
fill z0+.5(0,-thin_join)rotated theta |
| 136 |
---z[d]+.5(-ast_flare,-ast_flare)rotated theta |
| 137 |
..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta |
| 138 |
---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| |
| 139 |
labels(0,[-150],[-90],[-30],30,90,150); endchar; |
| 140 |
|
| 141 |
cmchar "Plus sign"; |
| 142 |
%beginarithchar("+"); |
| 143 |
beginchar("+",14sym_u#,6sym_u#+math_axis#,6sym_u#-math_axis#); |
| 144 |
italcorr math_axis#*slant-.5sym_u#; |
| 145 |
adjust_fit(0,0); |
| 146 |
pickup rule.nib; |
| 147 |
x1=x2=good.x .5w; top y1=h+eps; .5[y1,y2]=math_axis; |
| 148 |
lft x3=hround sym_u-eps; x4=w-x3; y3=y4=math_axis; |
| 149 |
draw z1--z2; % stem |
| 150 |
draw z3--z4; % crossbar |
| 151 |
labels(1,2,3,4); endchar; |
| 152 |
|
| 153 |
cmchar "Comma"; |
| 154 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 155 |
define_whole_blacker_pixels(dot_diam); |
| 156 |
beginchar(",",5u#,dot_diam#,comma_depth#); |
| 157 |
adjust_fit(0,0); |
| 158 |
x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0; |
| 159 |
comma(1,a,dot_diam,.2u,comma_depth); % dot and tail |
| 160 |
penlabels(1); endchar; |
| 161 |
|
| 162 |
cmchar "Period"; |
| 163 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 164 |
define_whole_blacker_pixels(dot_diam); |
| 165 |
beginchar(".",5u#,dot_diam#,0); |
| 166 |
adjust_fit(0,0); pickup fine.nib; |
| 167 |
pos1(dot_diam,0); pos2(dot_diam,90); |
| 168 |
lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2); % dot |
| 169 |
penlabels(1,2); endchar; |
| 170 |
|
| 171 |
cmchar "Virgule (slash)"; |
| 172 |
beginchar("/",9u#,body_height#,paren_depth#); |
| 173 |
italcorr body_height#*slant-.5u#; |
| 174 |
adjust_fit(0,0); pickup rule.nib; |
| 175 |
rt x1=hround(w-u)+eps; top y1=h+eps; |
| 176 |
lft x2=hround u-eps; bot y2=-d-eps; |
| 177 |
draw z1--z2; % diagonal |
| 178 |
penlabels(1,2); endchar; |
| 179 |
|
| 180 |
cmchar "Colon"; |
| 181 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 182 |
define_whole_blacker_pixels(dot_diam); |
| 183 |
beginchar(":",5u#,x_height#,0); |
| 184 |
italcorr x_height#*slant+.5dot_diam#-2u#; |
| 185 |
adjust_fit(0,0); pickup fine.nib; |
| 186 |
pos1(dot_diam,0); pos2(dot_diam,90); |
| 187 |
lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot |
| 188 |
pos3(dot_diam,0); pos4(dot_diam,90); |
| 189 |
x3=x1; bot y4l=0; z3=z4; dot(3,4); % lower dot |
| 190 |
penlabels(1,2,3,4); endchar; |
| 191 |
|
| 192 |
cmchar "Semicolon"; |
| 193 |
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; |
| 194 |
define_whole_blacker_pixels(dot_diam); |
| 195 |
beginchar(";",5u#,x_height#,comma_depth#); |
| 196 |
italcorr x_height#*slant+.5dot_diam#-2u#; |
| 197 |
adjust_fit(0,0); pickup fine.nib; |
| 198 |
pos1(dot_diam,0); pos2(dot_diam,90); |
| 199 |
lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot |
| 200 |
x3-.5dot_diam=hround(.5w-.5dot_diam); y3-.5dot_diam=0; |
| 201 |
comma(3,a,dot_diam,.05u,comma_depth); % lower dot and tail |
| 202 |
penlabels(1,2,3); endchar; |
| 203 |
|
| 204 |
cmchar "Equals sign"; |
| 205 |
compute_spread(.45sym_height#,.55sym_height#); |
| 206 |
beginchar("=",14sym_u#,v_center(spread#+rule_thickness#)); |
| 207 |
italcorr h#*slant-.5sym_u#; |
| 208 |
adjust_fit(0,0); pickup rule.nib; |
| 209 |
lft x1=hround sym_u-eps; x3=x1; x2=x4=w-x1; |
| 210 |
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; |
| 211 |
draw z1--z2; % upper bar |
| 212 |
draw z3--z4; % lower bar |
| 213 |
labels(1,2,3,4); endchar; |
| 214 |
|
| 215 |
cmchar "At sign"; |
| 216 |
beginchar("@",14u#,asc_height#,0); |
| 217 |
italcorr .7asc_height#*slant-.5u#; |
| 218 |
adjust_fit(0,if hefty or monospace:-2u# else: 0 fi); |
| 219 |
pickup fine.nib; pos0(fudged.hair,0); pos1(vair,90); |
| 220 |
pos2(fudged.stem,180); pos3(vair,270); |
| 221 |
pos4(fudged.stem,-180); pos5(fudged.stem,-180); |
| 222 |
pos6(vair,-90); pos7(fudged.hair,0); |
| 223 |
pos8(vair,90); pos9(fudged.hair,180); |
| 224 |
pos10(vair,270); pos11(.5[vair,flare],360); |
| 225 |
x1=x3=.5[x0,x2]; y0=y2=.5[y1,y3]; |
| 226 |
x8=x10=.5w; y7=y9=.5[y8,y10]; |
| 227 |
lft x9r=hround u; x7=w-x9; top y8r=h+oo; bot y10r=-oo; |
| 228 |
top y1r=vround(.8[y10,y8]+.5vair); bot y3r=vround(.2[y10,y8]-.5vair); |
| 229 |
x6l=1/3[x5l,x7l]; y6=y3; y11=good.y(.1[y10,y8]-.5); |
| 230 |
x0=x4=x5; y4=.8[y3,y1]; y5=2/3[y7,y6]; |
| 231 |
if hefty or monospace: lft x2r=hround(5u-.5fudged.stem); |
| 232 |
rt x0r=hround(w-3u); x11r=x0r; |
| 233 |
else: lft x2r=hround 3.4u; x0=w-x2; x11r=x7r; fi |
| 234 |
filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % left inner bowl |
| 235 |
filldraw stroke super_arc.e(3,0) & super_arc.e(0,1); % right inner bowl |
| 236 |
filldraw stroke super_arc.e(8,9) & super_arc.e(9,10) |
| 237 |
& term.e(10,11,right,1,4); % left outer bowl and terminal |
| 238 |
if hefty or monospace: {{interim superness:=hein_super; |
| 239 |
filldraw stroke super_arc.e(0,8)}}; % link |
| 240 |
else: (x,y6r)=whatever[z6l,z7l]; x6r:=x; |
| 241 |
filldraw stroke z4e---z5e...z6e{right}...{up}z7e |
| 242 |
& super_arc.e(7,8); fi % stem and link |
| 243 |
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; |
| 244 |
|
| 245 |
cmchar "Left bracket"; |
| 246 |
numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); |
| 247 |
beginchar("[",wd#,body_height#,paren_depth#); |
| 248 |
italcorr body_height#*slant; |
| 249 |
adjust_fit(0,0); |
| 250 |
numeric top_thickness,side_thickness; |
| 251 |
if hefty: top_thickness=vair; |
| 252 |
side_thickness=max(crisp.breadth,stem-2stem_corr); |
| 253 |
else: top_thickness=side_thickness=rule_thickness; fi; |
| 254 |
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); |
| 255 |
top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps; |
| 256 |
filldraw stroke z1e--z2e; % stem |
| 257 |
pos3(top_thickness,90); pos4(top_thickness,90); |
| 258 |
pos5(top_thickness,90); pos6(top_thickness,90); |
| 259 |
x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2; |
| 260 |
filldraw stroke z3e--z4e; % upper bar |
| 261 |
filldraw stroke z5e--z6e; % lower bar |
| 262 |
penlabels(1,2,3,4,5,6); endchar; |
| 263 |
|
| 264 |
cmchar "Right bracket"; |
| 265 |
numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); |
| 266 |
beginchar("]",wd#,body_height#,paren_depth#); |
| 267 |
italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi; |
| 268 |
adjust_fit(0,0); |
| 269 |
numeric top_thickness,side_thickness; |
| 270 |
if hefty: top_thickness=vair; |
| 271 |
side_thickness=max(crisp.breadth,stem-2stem_corr); |
| 272 |
else: top_thickness=side_thickness=rule_thickness; fi; |
| 273 |
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); |
| 274 |
top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps; |
| 275 |
filldraw stroke z1e--z2e; % stem |
| 276 |
pos3(top_thickness,90); pos4(top_thickness,90); |
| 277 |
pos5(top_thickness,90); pos6(top_thickness,90); |
| 278 |
x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2; |
| 279 |
filldraw stroke z3e--z4e; % upper bar |
| 280 |
filldraw stroke z5e--z6e; % lower bar |
| 281 |
penlabels(1,2,3,4,5,6); endchar; |
| 282 |
|
| 283 |
cmchar "Reverse apostrophe"; |
| 284 |
beginchar("`",5u#,asc_height#,0); |
| 285 |
italcorr asc_height#*slant+.5dot_size#-2u#; |
| 286 |
adjust_fit(0,0); |
| 287 |
x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h-comma_depth; |
| 288 |
if monospace: ammoc(1,a,dot_size,.28u,vround 1.5comma_depth); % large ammoc |
| 289 |
else: ammoc(1,a,dot_size,.25u,comma_depth); fi % normal ammoc |
| 290 |
penlabels(1); endchar; |