Debian Codegraph @

texmf-dist/fonts/source/jknappen/ec/expunct.mf

raw
1 % expunct.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 % punctuation
16
17 %%% italcorr corrital
18
19 version_check(1,0); % |version_check| was introduced in dc1.3
20
21 ecchar "Single left guillemet"; % jk
22 beginchar(oct"016",8u#,2bar_height#,0);
23 italcorr h#*slant-u#;
24 adjust_fit(0,0);
25 pickup fine.nib;
26 pos1(qvair,0); pos2(if monospace: qvair else: stem fi,0); pos3(qvair,0);
27 rt x1r=rt x3r=w-2u-eps;
28 lft x2l=hround(if not monospace: 2 fi\\ u)-eps;
29 bot y3=0; y2=good.y(h/2); top y1=2y2;
30 if not serifs or monospace:
31 filldraw stroke z1e--z2e--z3e;
32 else:
33 filldraw stroke
34 z1e{(x2e-x1e),1.8(y2e-y1e)}..{curl1}z2e{curl1}..
35 {(x3e-x2e),1.8(y3e-y2e)}z3e;
36 fi
37 penlabels(1,2,3);
38 endchar;
39
40 ecchar "Single right guillemet"; % jk
41 beginchar(oct"017",8u#,2bar_height#,0);
42 italcorr h#*slant-u#;
43 adjust_fit(0,0);
44 pickup fine.nib;
45 pos1(qvair,0); pos2(if monospace: qvair else: stem fi,0); pos3(qvair,0);
46 lft x1l=lft x3l=2u+eps;
47 rt x2r=w-hround(if not monospace: 2 fi\\ u)+eps;
48 bot y3=0; y2=good.y(h/2); top y1=2y2;
49 if not serifs or monospace:
50 filldraw stroke z1e--z2e--z3e;
51 else:
52 filldraw stroke
53 z1e{(x2e-x1e),1.8(y2e-y1e)}..{curl1}z2e{curl1}..
54 {(x3e-x2e),1.8(y3e-y2e)}z3e;
55 fi
56 penlabels(1,2,3); endchar;
57
58 ecchar "French opening quotes"; % from pl_cud (plfonts)
59 beginchar_twice(
60 if not hefty: oct"023",10u#,2bar_height#,0
61 else: oct"023",12u#,2bar_height#,0
62 fi);
63 adjust_fit(0,0);
64 pickup fine.nib;
65 numeric the_shift,shift_corr;
66 the_shift=hround(max(3u,1.7stem)); shift_corr=the_shift-3u;
67 pos1(qvair,0); pos2(if monospace: qvair else: stem fi,0); pos3(qvair,0);
68 rt x1r=rt x3r=hround(.6w-shift_corr)-eps;
69 lft x2l=hround(if not monospace: 2 fi\\ u-shift_corr)-eps;
70 bot y3=0; y2=good.y(h/2); top y1=2y2;
71 for i:=1,2,3:
72 forsuffixes $:=r, ,l: z[i]'$=z[i]$ + the_shift*right; endfor
73 endfor
74 if not serifs or monospace:
75 filldraw stroke z1e--z2e--z3e; filldraw stroke z1'e--z2'e--z3'e;
76 else:
77 filldraw stroke
78 z1e{(x2e-x1e),1.8(y2e-y1e)}..{curl1}z2e{curl1}..
79 {(x3e-x2e),1.8(y3e-y2e)}z3e;
80 filldraw stroke
81 z1'e{(x2'e-x1'e),1.8(y2'e-y1'e)}..{curl1}z2'e{curl1}..
82 {(x3'e-x2'e),1.8(y3'e-y2'e)}z3'e;
83 fi;
84 % italic correction is set to |0| in |beginchar|, so let's correct it
85 corrital z1'r;
86 penlabels(1,2,3,1',2',3');
87 repeat_once;
88 endchar;
89
90 ecchar "French closing quotes"; % from pl_cud (plfonts)
91 beginchar_twice(
92 if not hefty: oct"024",10u#,2bar_height#,0
93 else: oct"024",12u#,2bar_height#,0
94 fi);
95 adjust_fit(0,0)
96 pickup fine.nib;
97 numeric the_shift,shift_corr;
98 the_shift=hround(max(3u,1.7stem)); shift_corr=the_shift-3u;
99 pos1(qvair,0); pos2(if monospace: qvair else: stem fi,0); pos3(qvair,0);
100 lft x1l=lft x3l=w-hround(.6w-shift_corr)+eps;
101 rt x2r=w-hround(if not monospace: 2 fi\\ u-shift_corr)+eps;
102 bot y3=0; y2=good.y(h/2); top y1=2y2;
103 for i:=1,2,3:
104 forsuffixes $:=r, ,l: z[i]'$=z[i]$ + the_shift*left; endfor
105 endfor
106 if not serifs or monospace:
107 filldraw stroke z1e--z2e--z3e; filldraw stroke z1'e--z2'e--z3'e;
108 else:
109 filldraw stroke
110 z1e{(x2e-x1e),1.8(y2e-y1e)}..{curl1}z2e{curl1}..
111 {(x3e-x2e),1.8(y3e-y2e)}z3e;
112 filldraw stroke
113 z1'e{(x2'e-x1'e),1.8(y2'e-y1'e)}..{curl1}z2'e{curl1}..
114 {(x3'e-x2'e),1.8(y3'e-y2'e)}z3'e;
115 fi;
116 % italic correction is set to |0| in |beginchar|, so let's correct it
117 corrital z2r;
118 penlabels(1,2,3,1',2',3');
119 repeat_once;
120 endchar;
121
122 ecchar "German opening comma";
123 beginchar(oct"015",5u#,pdot_diam#,comma_depth#);
124 adjust_fit(0,0);
125 x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1-.5pdot_diam=0;
126 comma(1,a,pdot_diam,.2u,comma_depth); % dot and tail
127 penlabels(1); endchar;
128
129 ecchar "German Opening quotes";
130 beginchar(oct"022",3u#+max(2u#,pdot_diam#),pdot_diam#,comma_depth#);
131 italcorr asc_height#*slant+pdot_diam#-4.1u#;
132 adjust_fit(.5u#,.5u#);
133 x2+.5pdot_diam=hround(w-.6u+.5pdot_diam); y2-.5pdot_diam=0;
134 x1=w-x2; y2=y1;
135 comma(1,a,pdot_diam,.25u,comma_depth); % left dot and tail
136 comma(2,b,pdot_diam,.25u,comma_depth); % right dot and tail
137 penlabels(1,2); endchar;
138
139 ecchar "Exclamation point";
140 beginchar("!",5u#+width_adj#,asc_height#,0);
141 italcorr asc_height#*slant-2u#-.5width_adj#+.5pdot_diam#;
142 adjust_fit(0,0);
143 pickup tiny.nib; pos3(pdot_diam,0); pos4(pdot_diam,90);
144 lft x3l=hround(.5w-.5pdot_diam); bot y4l=0; z3=z4; dot(3,4); % dot
145 numeric bot_width;
146 bot_width=if hefty:max(hround .8pdot_diam,fine.breadth) else: hair fi;
147 pickup fine.nib; pos1(pdot_diam,0); pos2(bot_width,0);
148 x1=x2=x3; bot y2=.25[top y4r,x_height]+1;
149 if square_dots: top y1=h;
150 filldraw stroke z1e--z2e; % stem
151 else: top z0=(x1,h+o); y1+.5pdot_diam=h+o;
152 filldraw z1r...z0...z1l---z2l--z2r---cycle; fi % stem and bulb
153 penlabels(0,1,2,3,4); endchar;
154
155
156
157 ecchar "Apostrophe";
158 beginchar("'",5u#,asc_height#,0);
159 italcorr asc_height#*slant+.5pdot_diam#-2u#;
160 adjust_fit(0,0);
161 x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1+.5pdot_diam=h;
162 if monospace: comma(1,a,pdot_diam,.28u,vround 1.5comma_depth); % large comma
163 else: comma(1,a,pdot_diam,.25u,comma_depth); fi % comma with increased jut
164 penlabels(1); endchar;
165
166
167 ecchar "Asterisk";
168 beginchar("*",9u#,
169 if low_asterisk:math_axis#+.5x_height# else: body_height# fi,0);
170 italcorr h#*slant-.75u#;
171 adjust_fit(0,0);
172 numeric ast_flare; ast_flare=hround .7[thin_join,stem];
173 x0=.5w; y0=h-.5x_height;
174 for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height;
175 numeric theta; theta=angle(z[d]-z0);
176 fill z0+.5(0,-thin_join)rotated theta
177 ---z[d]+.5(-ast_flare,-ast_flare)rotated theta
178 ..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta
179 ---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d|
180 labels(0,[-150],[-90],[-30],30,90,150); endchar;
181
182 ecchar "Plus sign";
183 beginarithchar("+"); pickup extra_rule.nib;
184 x1=x2=good.x .5w; top y1=h+eps; .5[y1,y2]=math_axis;
185 lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis;
186 draw z1--z2; % stem
187 draw z3--z4; % crossbar
188 labels(1,2,3,4); endchar;
189
190 ecchar "Comma";
191 beginchar(",",5u#,pdot_diam#,comma_depth#);
192 adjust_fit(0,0);
193 x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1-.5pdot_diam=0;
194 comma(1,a,pdot_diam,.2u,comma_depth); % dot and tail
195 penlabels(1); endchar;
196
197 ecchar "Period";
198 beginchar(".",5u#,pdot_diam#,0);
199 adjust_fit(0,0); pickup fine.nib;
200 pos1(pdot_diam,0); pos2(pdot_diam,90);
201 lft x1l=hround(.5w-.5pdot_diam); bot y2l=0; z1=z2; dot(1,2); % dot
202 penlabels(1,2); endchar;
203
204 ecchar "Virgule (slash)";
205 beginchar("/",9u#,body_height#,paren_depth#);
206 italcorr body_height#*slant-.5u#;
207 adjust_fit(0,0); pickup extra_rule.nib;
208 rt x1=hround(w-u)+eps; top y1=h+eps;
209 lft x2=hround u-eps; bot y2=-d-eps;
210 draw z1--z2; % diagonal
211 penlabels(1,2); endchar;
212
213 ecchar "Colon";
214 beginchar(":",5u#,x_height#,0);
215 italcorr x_height#*slant+.5pdot_diam#-2u#;
216 adjust_fit(0,0); pickup fine.nib;
217 pos1(pdot_diam,0); pos2(pdot_diam,90);
218 lft x1l=hround(.5w-.5pdot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot
219 pos3(pdot_diam,0); pos4(pdot_diam,90);
220 x3=x1; bot y4l=0; z3=z4; dot(3,4); % lower dot
221 penlabels(1,2,3,4); endchar;
222
223 ecchar "Semicolon";
224 beginchar(";",5u#,x_height#,comma_depth#);
225 italcorr x_height#*slant+.5pdot_diam#-2u#;
226 adjust_fit(0,0); pickup fine.nib;
227 pos1(pdot_diam,0); pos2(pdot_diam,90);
228 lft x1l=hround(.5w-.5pdot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot
229 x3-.5pdot_diam=hround(.5w-.5pdot_diam); y3-.5pdot_diam=0;
230 comma(3,a,pdot_diam,.2u,comma_depth); % lower dot and tail
231 penlabels(1,2,3); endchar;
232
233 ecchar "Equals sign";
234 compute_spread(.45x_height#,.55x_height#);
235 beginchar("=",14u#,v_center(spread#+rule_thickness#));
236 italcorr h#*slant-.5u#;
237 adjust_fit(0,0); pickup extra_rule.nib;
238 lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
239 y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
240 draw z1--z2; % upper bar
241 draw z3--z4; % lower bar
242 labels(1,2,3,4); endchar;
243
244
245
246 ecchar "Reverse apostrophe";
247 beginchar("`",5u#,asc_height#,0);
248 italcorr asc_height#*slant+.5pdot_diam#-2u#;
249 adjust_fit(0,0);
250 x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1+.5pdot_diam=h-comma_depth;
251 if monospace: ammoc(1,a,pdot_diam,.28u,vround 1.5comma_depth); % large ammoc
252 else: ammoc(1,a,pdot_diam,.25u,comma_depth); fi % normal ammoc
253 penlabels(1); endchar;
254
255
256 ecchar "Spanish open exclamation point";
257 beginchar(oct"275",5u#+width_adj#,asc_height#-desc_depth#,desc_depth#);
258 italcorr h#*slant-2u#-.5width_adj#+.5pdot_diam#;
259 adjust_fit(0,0);
260 pickup tiny.nib; pos3(pdot_diam,0); pos4(pdot_diam,90);
261 lft x3l=hround(.5w-.5pdot_diam); top y4r=h; z3=z4; dot(3,4); % dot
262 numeric top_width;
263 top_width=if hefty:max(hround .8pdot_diam,fine.breadth) else: hair fi;
264 pickup fine.nib; pos1(pdot_diam,0); pos2(top_width,0);
265 x1=x2=x3; top y2=.25[bot y4l,h-x_height]-1;
266 if square_dots: bot y1=-d;
267 filldraw stroke z1e--z2e; % stem
268 else: bot z0=(x1,-d-o); y1-.5pdot_diam=-d-o;
269 filldraw z1l...z0...z1r---z2r--z2l---cycle; fi % stem and bulb
270 penlabels(0,1,2,3,4); endchar;
271
272
273 ecchar "Closing quotes";
274 beginchar(oct"021",3u#+max(2u#,pdot_diam#),asc_height#,0);
275 italcorr asc_height#*slant+pdot_diam#-4.1u#;
276 adjust_fit(.5u#,.5u#);
277 x1+.5pdot_diam=hround(.6u+.5pdot_diam); y2+.5pdot_diam=h;
278 x2=w-x1; y2=y1;
279 comma(1,a,pdot_diam,.25u,comma_depth); % left dot and tail
280 comma(2,b,pdot_diam,.25u,comma_depth); % right dot and tail
281 penlabels(1,2); endchar;
282
283 ecchar "Hyphen";
284 beginchar("-",6u#,x_height#,0);
285 italcorr .5x_height#*slant-.5u#;
286 adjust_fit(0,0);
287 numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
288 pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
289 top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
290 if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
291 filldraw stroke z1e--z2e; % bar
292 penlabels(1,2); endchar;
293
294 ecchar "Opening quotes";
295 beginchar(oct"20",3u#+max(2u#,pdot_diam#),asc_height#,0);
296 italcorr asc_height#*slant-.1u#;
297 adjust_fit(.5u#,.5u#);
298 x2+.5pdot_diam=hround(w-.6u+.5pdot_diam); y1+.5pdot_diam=h-comma_depth;
299 x1=w-x2; y2=y1;
300 ammoc(1,a,pdot_diam,.25u,comma_depth); % left dot and tail
301 ammoc(2,b,pdot_diam,.25u,comma_depth); % right dot and tail
302 penlabels(1,2); endchar;
303
304 iff not monospace:
305 ecchar "En dash";
306 beginchar(oct"025",9u#,x_height#,0);
307 italcorr .61803x_height#*slant+.5u#;
308 adjust_fit(0,0);
309 pickup crisp.nib; pos1(vair,90); pos2(vair,90);
310 top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
311 filldraw stroke z1e--z2e; % bar
312 penlabels(1,2); endchar;
313
314
315 iff monospace:
316 ecchar "Hyphen";
317 beginchar(oct"025",6u#,x_height#,0);
318 italcorr .5x_height#*slant-.5u#;
319 adjust_fit(0,0);
320 numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
321 pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
322 top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
323 if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
324 filldraw stroke z1e--z2e; % bar
325 penlabels(1,2); endchar;
326
327 iff not monospace:
328 ecchar "Em dash";
329 beginchar(oct"026",18u#,x_height#,0);
330 italcorr .61803x_height#*slant+.5u#;
331 adjust_fit(letter_fit#,letter_fit#);
332 pickup crisp.nib; pos1(vair,90); pos2(vair,90);
333 top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
334 filldraw stroke z1e--z2e; % bar
335 penlabels(1,2); endchar;
336
337 iff monospace:
338 ecchar "Hyphen";
339 beginchar(oct"026",6u#,x_height#,0);
340 italcorr .5x_height#*slant-.5u#;
341 adjust_fit(0,0);
342 numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
343 pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
344 top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
345 if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
346 filldraw stroke z1e--z2e; % bar
347 penlabels(1,2); endchar;
348
349 endinput;