| 1 |
% exsign.mf |
| 2 |
% |
| 3 |
% (c) Copyright 1995, 1996, 1997 J"org Knappen |
| 4 |
% (c) Copyright 1990, 1992 Norbert Schwarz |
| 5 |
% |
| 6 |
% This file is part of ecfonts version 1.0 |
| 7 |
% |
| 8 |
% Please read the files 00readme.txt, 00inst.txt, 00error.txt, and |
| 9 |
% copyrite.txt for further information |
| 10 |
% |
| 11 |
% You find some documentation in ecdoc.tex (needs LaTeX2e) |
| 12 |
% |
| 13 |
% Content: |
| 14 |
% |
| 15 |
% special characters common to roman and italic style fonts |
| 16 |
|
| 17 |
version_check(1,0); % |version_check| was introduced in dc1.3 |
| 18 |
|
| 19 |
ecchar "Zero for p mille sign"; |
| 20 |
beginchar(oct"030",if serifs: |
| 21 |
if monospace: 9u#+max(6u#,2fudge*(hair#+stem#)) else: 7u# fi else: 8u# fi, |
| 22 |
body_height#,body_height#-asc_height#); |
| 23 |
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; |
| 24 |
adjust_fit(0,0); pickup fine.nib; |
| 25 |
numeric left_curve,right_curve; |
| 26 |
left_curve=hround 5/6[fudged.hair,fudged.stem]; |
| 27 |
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); |
| 28 |
pos1(vair,90); |
| 29 |
pos2(left_curve,180); |
| 30 |
pos3(vair,270); |
| 31 |
pos4(right_curve,360); |
| 32 |
bot y3r=-d; |
| 33 |
rt x4r=hround(.5w +2.5u ); |
| 34 |
lft x2r=hround(.5w -2.5u ) ; |
| 35 |
top y1r=vround(if monospace: .3 else: .5 fi\\ asc_height); |
| 36 |
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; |
| 37 |
filldraw stroke pulled_super_arc.e(1,2)(superpull) |
| 38 |
& pulled_super_arc.e(2,3)(superpull); % left half of lower bowl |
| 39 |
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of lower bowl |
| 40 |
penlabels(1,2,3,4); endchar; |
| 41 |
|
| 42 |
|
| 43 |
ecchar "Straight double quotes"; |
| 44 |
beginchar(oct"042",9u#,asc_height#,0); |
| 45 |
numeric top_width#,spread#; |
| 46 |
top_width#=if serifs: flare# else: stem# fi; |
| 47 |
spread#=max(3u#,top_width#+.5u#); define_pixels(spread); |
| 48 |
italcorr asc_height#*slant+.5top_width#+.5spread#-4u#; |
| 49 |
adjust_fit(0,0); |
| 50 |
x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3; |
| 51 |
y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height); |
| 52 |
if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0); |
| 53 |
pos3(flare,0); pos4(vair,0); |
| 54 |
y1+.5stem=h; filldraw circ_stroke z1e--z2e; % left stem and bulb |
| 55 |
filldraw circ_stroke z3e--z4e; % right stem and bulb |
| 56 |
else: pickup fine.nib; pos1(stem,0); pos2(vair,0); |
| 57 |
pos3(stem,0); pos4(vair,0); |
| 58 |
top y1=h; filldraw stroke z1e--z2e; % left stem |
| 59 |
filldraw stroke z3e--z4e; fi % right stem |
| 60 |
penlabels(1,2,3,4); endchar; |
| 61 |
|
| 62 |
|
| 63 |
ecchar "Hash mark (number sign)"; |
| 64 |
if monospace: compute_spread(.6x_height#,.7x_height#); |
| 65 |
else: compute_spread(.45x_height#,.55x_height#); fi |
| 66 |
beginchar("#",15u#,asc_height#,asc_depth#); |
| 67 |
italcorr (math_axis#+.5(spread#+rule_thickness#))*slant-.5u#; |
| 68 |
adjust_fit(0,0); |
| 69 |
pickup extra_rule.nib; lft x1=hround u-eps; x3=x1; x2=x4=w-x1; |
| 70 |
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; |
| 71 |
draw z1--z2; % upper bar |
| 72 |
draw z3--z4; % lower bar |
| 73 |
lft x6=hround 3u; rt x7=hround(w-3u); x5-x6=x7-x8; |
| 74 |
x8=good.x if monospace: .6 else: .5 fi\\w; |
| 75 |
top y5=top y7=h+eps; bot y6=bot y8=-d-eps; |
| 76 |
y15=y1; z15=whatever[z5,z6]; y36=y3; z36=whatever[z5,z6]; |
| 77 |
y27=y2; z27=whatever[z7,z8]; y48=y4; z48=whatever[z7,z8]; |
| 78 |
draw z5--if x5>x6+1:(good.x(x15+.5),y1)--(good.x(x15-.5),y1) |
| 79 |
--(good.x(x36+.5),y3)--(good.x(x36-.5),y3)--fi\\z6; % left diagonal |
| 80 |
draw z7--if x7>x8+1:(good.x(x27+.5),y2)--(good.x(x27-.5),y2) |
| 81 |
--(good.x(x48+.5),y4)--(good.x(x48-.5),y4)--fi\\z8; % right diagonal |
| 82 |
labels(1,2,3,4,5,6,7,8,15,27,36,48); endchar; |
| 83 |
|
| 84 |
ecchar "Dollar sign"; |
| 85 |
beginchar("$",9u#,body_height#,body_height#-asc_height#); |
| 86 |
italcorr fig_height#*slant-.5u#; % same as for digits |
| 87 |
adjust_fit(0,0); |
| 88 |
numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u; |
| 89 |
pickup fine.nib; pos2(slab,-90); |
| 90 |
pos0(cap_stem,theta); pos7(slab,-90); |
| 91 |
x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo; |
| 92 |
y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u); |
| 93 |
x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-fine; |
| 94 |
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; |
| 95 |
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; |
| 96 |
filldraw stroke super_arc.e(2,3) & z3e{down} |
| 97 |
..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke |
| 98 |
if serifs: pos1(hair,0); pos8(hair,180); |
| 99 |
pos10(flare,0); pos9(flare,180); |
| 100 |
rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7]; |
| 101 |
{{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10); % upper arc and bulb |
| 102 |
bulb(7,8,9)}}; % lower arc and bulb |
| 103 |
else: pos1(.6[slab,flare],-100); pos8(flare,-100); |
| 104 |
rt x1l=hround(w-1.3u); lft x8r=hround .8u; |
| 105 |
top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo; |
| 106 |
filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal |
| 107 |
filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal |
| 108 |
pickup crisp.nib; pos12(bar,0); pos11(bar,0); |
| 109 |
lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d; |
| 110 |
filldraw stroke z12e--z11e; % vertical crossbar |
| 111 |
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
ecchar "Per cent sign"; |
| 116 |
beginchar("%",9u#+max(6u#,2fudge*(hair#+stem#)), |
| 117 |
body_height#,body_height#-asc_height#); |
| 118 |
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; |
| 119 |
adjust_fit(0,0); pickup fine.nib; |
| 120 |
numeric left_curve,right_curve; |
| 121 |
left_curve=hround 5/6[fudged.hair,fudged.stem]; |
| 122 |
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); |
| 123 |
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360); |
| 124 |
top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u); |
| 125 |
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height); |
| 126 |
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; |
| 127 |
filldraw stroke pulled_super_arc.e(1,2)(superpull) |
| 128 |
& pulled_super_arc.e(2,3)(superpull); % left half of upper bowl |
| 129 |
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl |
| 130 |
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360); |
| 131 |
bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u); |
| 132 |
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height); |
| 133 |
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7]; |
| 134 |
filldraw stroke pulled_super_arc.e(5,6)(superpull) |
| 135 |
& pulled_super_arc.e(6,7)(superpull); % left half of lower bowl |
| 136 |
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl |
| 137 |
pickup rule.nib; top y9=h; bot y10=-d; |
| 138 |
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps); |
| 139 |
draw z9--z10; % diagonal |
| 140 |
else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10; % diagonal |
| 141 |
pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90); |
| 142 |
pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90); |
| 143 |
path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r; |
| 144 |
filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi % link |
| 145 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 146 |
|
| 147 |
ecchar "At sign"; |
| 148 |
beginchar("@",14u#,asc_height#,0); |
| 149 |
italcorr .7asc_height#*slant-.5u#; |
| 150 |
adjust_fit(0,if hefty or monospace:-2u# else: 0 fi); |
| 151 |
pickup fine.nib; pos0(fudged.hair,0); pos1(vair,90); |
| 152 |
pos2(fudged.stem,180); pos3(vair,270); |
| 153 |
pos4(fudged.stem,-180); pos5(fudged.stem,-180); |
| 154 |
pos6(vair,-90); pos7(fudged.hair,0); |
| 155 |
pos8(vair,90); pos9(fudged.hair,180); |
| 156 |
pos10(vair,270); pos11(.5[vair,flare],360); |
| 157 |
x1=x3=.5[x0,x2]; y0=y2=.5[y1,y3]; |
| 158 |
x8=x10=.5w; y7=y9=.5[y8,y10]; |
| 159 |
lft x9r=hround u; x7=w-x9; top y8r=h+oo; bot y10r=-oo; |
| 160 |
top y1r=vround(.8[y10,y8]+.5vair); bot y3r=vround(.2[y10,y8]-.5vair); |
| 161 |
x6l=1/3[x5l,x7l]; y6=y3; y11=good.y(.1[y10,y8]-.5); |
| 162 |
x0=x4=x5; y4=.8[y3,y1]; y5=2/3[y7,y6]; |
| 163 |
if hefty or monospace: lft x2r=hround(5u-.5fudged.stem); |
| 164 |
rt x0r=hround(w-3u); x11r=x0r; |
| 165 |
else: lft x2r=hround 3.4u; x0=w-x2; x11r=x7r; fi |
| 166 |
filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % left inner bowl |
| 167 |
filldraw stroke super_arc.e(3,0) & super_arc.e(0,1); % right inner bowl |
| 168 |
filldraw stroke super_arc.e(8,9) & super_arc.e(9,10) |
| 169 |
& term.e(10,11,right,1,4); % left outer bowl and terminal |
| 170 |
if hefty or monospace: {{interim superness:=hein_super; |
| 171 |
filldraw stroke super_arc.e(0,8)}}; % link |
| 172 |
else: (x,y6r)=whatever[z6l,z7l]; x6r:=x; |
| 173 |
filldraw stroke z4e---z5e...z6e{right}...{up}z7e |
| 174 |
& super_arc.e(7,8); fi % stem and link |
| 175 |
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; |
| 176 |
|
| 177 |
ecchar "Sterling sign"; |
| 178 |
beginchar(oct"277",12u#,asc_height#,0); |
| 179 |
adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib; |
| 180 |
pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180); |
| 181 |
pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4; |
| 182 |
x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u; |
| 183 |
y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo; |
| 184 |
rt x1r=hround(w-1.5u); bulb(2,1,0); % bulb |
| 185 |
filldraw stroke pulled_arc.e(2,3)..z4e; % stem |
| 186 |
numeric light_stem; light_stem=2/3[vair,vstem]; |
| 187 |
pos6(.5[hair,light_stem],-180); pos7(light_stem,-300); |
| 188 |
pos8(light_stem,-300); pos9(hair,-180); |
| 189 |
lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u); |
| 190 |
y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h; |
| 191 |
filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right} |
| 192 |
..{right}z8e...{up}z9e; % loop and arm |
| 193 |
pos10(bar,90); pos11(bar,90); x10=3u; x11=w-4.5u; |
| 194 |
top y10r=top y11r=vround(.5h+.5bar); filldraw stroke z10e--z11e; % bar |
| 195 |
penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; |
| 196 |
|
| 197 |
|
| 198 |
ecchar "Section sign"; % renovated (jk) |
| 199 |
beginchar(oct"237",6.5u#+max(1.5u#,stem#),asc_height#,desc_depth#); |
| 200 |
adjust_fit(0,0); pickup fine.nib; |
| 201 |
numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; |
| 202 |
numeric ess'; ess'=max(fine.breadth,cap_ess); |
| 203 |
numeric sstem; sstem=hround .5[s_slab,ess']-fine; |
| 204 |
if sstem < fine.breadth: sstem:=fine.breadth; fi |
| 205 |
pos2(vair,90); pos3(sstem,180); |
| 206 |
pos4(ess',270); pos4'(vair,270); |
| 207 |
pos5'(sstem,0); pos5(sstem,180); |
| 208 |
pos6(ess',90); pos6'(vair,90); pos7(sstem,0); |
| 209 |
pos8(vair,-90); |
| 210 |
top y2r=h+oo; bot y8r=-d-oo; |
| 211 |
y3=.52[y4,y2]; y5=.52[y4,y6]; y7=.52[y6,y8]; y5'=.52[y6,y4]; |
| 212 |
y2-y4=y4-y6=y6-y8; |
| 213 |
bot z4'=bot z4; top z6'=top z6; |
| 214 |
lft x3r=hround 1.25u; |
| 215 |
x2=x4=x6=x8=.5w; x5=x7=w-x3; x5'=x3; |
| 216 |
if serifs: |
| 217 |
pos0(stem,0); pos1(hair,0); pos9(hair,-180); pos10(stem,-180); |
| 218 |
rt x1r=hround(w-1.5u); x9=w-x1; y2-y1=y9-y8=(y2-y8)/8; |
| 219 |
bulb(2,1,0); bulb(8,9,10); % bulbs |
| 220 |
else: |
| 221 |
pos1(.6[slab,flare],-100); pos9(flare,-100); pos2'(vair,-90); |
| 222 |
rt x1l=hround(w-1.3u); lft x9r=hround .8u; z2'=z2; |
| 223 |
top y1l=vround .92asc_height+oo; bot y9r=vround .1asc_height-d-oo; |
| 224 |
filldraw stroke term.e(2',1,right,.9,4); % upper arc and terminal |
| 225 |
filldraw stroke term.e(8,9,left,.9,4); % lower arc and terminal |
| 226 |
fi |
| 227 |
filldraw stroke z2e{left}...z3e{down}...z4e{3(x5-x3),y5-y3} |
| 228 |
...z5e{down}...{left}z6'e; % upper stroke |
| 229 |
filldraw stroke z4'e{left}...z5'e{down}...z6e{3(x7-x5'),y7-y5'} |
| 230 |
...z7e{down}...{left}z8e; % upper stroke |
| 231 |
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; |
| 232 |
|
| 233 |
endinput; |