Debian Codegraph @

texmf-dist/fonts/source/public/cmbright/ebpunct.mf

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