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