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
|
% This is FCRLIG.MF
% Version 1.1
% Date 6-OCT-1996
%
% (c) 1991, 1996 by J"org Knappen. See fc.rme for copying conditions
% This file is part of the fc-package
% See fc.rme for more information
%
% J"org Knappen
% Unternehmensberatung
% Barbarossaring 43
% D-55118 Mainz
% knappen@vkpmzd.kph.uni-mainz.de
% Contents:
%
% The following ligatures are generated without condition:
%
% fi, fl, ff, ffi, ffl
%
% And the following on demand, i. e. if their code is known:
%
% fj_lig, t_esh_lig
%
% Higher versions of this file might include more ligatures.
iff known fj_lig:
cmchar "The ligature fj";
beginchar(fj_lig,10u#+2letter_fit#,asc_height#,desc_depth#);
italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_size# fi-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); rt x11r=hround(w-2.5u+.5stem');
pos12(stem',0); x11=x12; bot y12=-1/3d;
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size];
pos2(bulb_diam,0); x2r=x12r;
y2+.5bulb_diam=.8[x_height,h+oo]; top y11=x_height+min(oo,serif_drop);
if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: bulb_diam=max(stem,dot_size);
pos2(6/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u;
pickup tiny.nib; pos13(bulb_diam,0); pos14(bulb_diam,90);
x13=x11-.5; top y14r=min(2x_height,h+1); top y11=x_height;
if bot y14l-x_height<tiny: y14l:=min(y14r-eps,y11+2tiny); fi
x13=x14; y13=.5[y14l,y14r]; dot(13,14); % dot
fi; % this is the ligature we're drawing
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
pickup tiny.nib; filldraw stroke z11e--z12e; % right stem
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
if serifs: x4=x11; % bar will overlap upper right serif
sloped_serif.l(11,12,d,1/3,jut,min(oo,serif_drop)); % upper right serif
pickup tiny.nib; pos15(vair,-90); pos16(hair,-180); pos17(flare,-180);
x15=.5[x12,x16r]; bot y15r=-d-oo; y16-.5flare=-.88d;
if monospace:lft x16r=lft x1l; else: z16r=z17r; rt x17l=rt x1r; fi
(x,y15r)=whatever[z15l,z12l]; x15r:=max(x,.5[x16r,x15r]);
filldraw stroke z12e{down}...z15e{left}; bulb(15,16,17); % arc & bulb
else: rt x4= hround 5.3u;
pickup fine.nib; pos12'(stem',0); z12'=z12;
pos16(.2[vair,stem'],-90); pos17(vair,-90);
lft x17r=lft x1l; bot y17r=vround 5/6(-d-oo);
(x,y17l)=whatever[z17r,z13]; x7l:=x;
z15r=z12'r; (x12'l,y15l)=whatever[z17l,z15r]; x15l=x12'l; y15=y15r;
x16r=.5[x17r,x15r]; x6l:=.5[x17l,x15l]; bot y16r=-d-oo;
filldraw stroke z12'e..{down}z15e & super_arc.e(15,16)
& z16e{left}..z17e; % arc & terminal
fi
pickup crisp.nib; filldraw stroke z3e--z4e; % bar
penlabels(1,2,3,4,11,12,13,14,15,16,17); endchar;
iff known t_esh_lig:
cmchar "The ligature t-esh"; % from wsuipa
beginchar(t_esh_lig,10u#+max(u#,.5stem#),
min(asc_height#,if hefty:9/7 else:10/7 fi\\ x_height#),desc_depth#);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: 0 else: -.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=y8; y3=max(.5bar_height,2vair);
pickup crisp.nib; pos8(bar,90);
rt x8=hround(2/3w-.3u); top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
if hefty: pos7(bar,90);
filldraw stroke z7e--z8e; % crossbar
pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
rt x1r=fine.rt x2l; top y1=h;
penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
filldraw stroke z1e--z2'e; % upper terminal
else: pos7(vair,90); pos1(hair,0);
rt x1r=fine.rt x2l; top y1=h;
filldraw z1l{down}...{left}z7r--z7l--z8l
--z8r--(x1r,y8r)--z1r--cycle; fi % upper terminal and crossbar
pickup fine.nib; interim superness:=more_super;
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(2/3w-.5u);
if serifs: pos5(hair,0); y5=y3; x4l=.5[x3l,x5l];
(x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
filldraw stroke z2e..super_arc.e(3,4)...{up}z5e; % stem and hook
pickup crisp.nib; pos6(hair,0); pos5'(hair,0);
x6l=x5=x5'; top y6=max(vround .75bar_height,top y5); y5=y5';
filldraw stroke z5'e--z6e; % terminal
else: pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
filldraw stroke z2e..super_arc.e(3,4); % stem and hook
path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e; % terminal
if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
filldraw stroke z4e{right}...{up}z5e;
else: filldraw p; fi fi;
%cmchar "The letter esh";
pickup tiny.nib; pos21(shaved_stem,0); pos22(shaved_stem,0);
lft x21l=x5; x21=x22; top y21=.8h; bot y22=0;
filldraw stroke z21e--z22e; % stem
% hooktop
pickup tiny.nib;
pos10(vair,-90); x10=.5[x21,x11l]; top y10l=h+o+1;
pos11(hair,0); rt x11l=hround(w-.4u); y11=.84h;
pos12(flare,0);
pos10'(vair,90); z10'=z10;
bulb(10',11,12); % bulb
filldraw stroke pulled_super_arc.e(21,10)(.4superpull); % arc and stem
%tail
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
define_whole_blacker_pixels(dot_diam);
pickup tiny.nib; pos15(vair,-90); pos16(hair,-180); pos17(flare,-180);
x15=.5[x16r,x22]; bot y15r=-d+oo; y16-.5flare=-.85d;
z16r=z17r; x17r=hround(x3+.1u); if not serifs:(x,y15r)=whatever[z15l,z2l]; fi
x15r:=max(x,.5[x16r,x15]);
filldraw stroke pulled_super_arc.e(22,15)(.4superpull);
bulb(15,16,17); % arc and bulb
penlabels(1,2,3,4,5,6,7,8,10,11,12,15,16,17,21,22); endchar;
cmchar "The ligature ff";
beginchar(oct"033",10.5u#+2letter_fit#,asc_height#,0);
italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi;
adjust_fit(0,0);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); rt x11r=hround(w-3u+.5stem');
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround .8[stem,flare];
pos2(bulb_diam,0); pos12(bulb_diam,0);
rt x2r=hround(rt x11r-stem_corr); lft x12l=hround(w-.75u+.5);
y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo];
if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 6.25u;
pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(w+.75u); fi
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
f_stroke(11,12,d,e,f,inner_jut,1.25jut); % right stem, arc, terminal, serif
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
rt x4=hround(w-1/3u);
if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
pos4'(bar,90); x4'=x11; y4'=y4;
filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars
else: filldraw stroke z3e--z4e; fi % bar
penlabels(1,2,3,4,11,12); endchar;
cmchar "The ligature fi";
beginchar(oct"034",10u#+2letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_size# fi-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); rt x11r=hround(w-2.5u+.5stem');
pos12(stem',0); x11=x12; bot y12=0;
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size];
pos2(bulb_diam,0); x2r=x12r;
y2+.5bulb_diam=.8[x_height,h+oo]; top y11=x_height+min(oo,serif_drop);
if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: bulb_diam=max(stem,dot_size);
pos2(6/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u;
pickup tiny.nib; pos13(bulb_diam,0); pos14(bulb_diam,90);
x13=x11-.5; top y14r=min(2x_height,h+1); top y11=x_height;
if bot y14l-x_height<tiny: y14l:=min(y14r-eps,y11+2tiny); fi
x13=x14; y13=.5[y14l,y14r]; dot(13,14); % dot
fi; % this is the ligature we're drawing
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
pickup tiny.nib; filldraw stroke z11e--z12e; % right stem
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
if serifs: x4=x11; % bar will overlap upper right serif
sloped_serif.l(11,12,d,1/3,jut,min(oo,serif_drop)); % upper right serif
dish_serif(12,11,e,1/3,inner_jut,f,1/3,jut); % lower right serif
else: rt x4= hround 5.3u; fi
pickup crisp.nib; filldraw stroke z3e--z4e; % bar
penlabels(1,2,3,4,11,12,13,14); endchar;
cmchar "The ligature fl";
beginchar(oct"035",10u#+2letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); rt x11r=hround(w-2.5u+.5stem');
pos12(stem',0); x11=x12; bot y12=0; top y11=h;
filldraw stroke z11e--z12e; % right stem
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround .8[stem,flare];
pos2(bulb_diam,0); x2r=x11r-stem_corr;
y2+.5bulb_diam=.9[x_height,h+oo];
sloped_serif.l(11,12,d,1/3,eps,max(serif_drop,oo)); % erase excess at top
if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u; fi
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
if serifs: x4=x11;
dish_serif(12,11,e,1/3,inner_jut,f,1/3,jut); % lower right serif
else: rt x4= hround 5.3u; fi
pickup crisp.nib; filldraw stroke z3e--z4e; % bar
penlabels(1,2,3,4,11,12); endchar;
cmchar "The ligature ffi";
beginchar(oct"036",15u#+4letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_size# fi-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); lft x11l=hround(.5w-.5stem');
pos21(stem',0); rt x21r=hround(w-2.5u+.5stem');
pos22(stem',0); x21=x22; bot y22=0;
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size];
pos2(bulb_diam,0); x2r=x11r-stem_corr;
pos12(bulb_diam,0); x12r=x21r;
top y21=x_height+min(oo,serif_drop);
y2+.5bulb_diam=.8[x_height,h+oo]; y12=y2;
if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: bulb_diam=max(stem,dot_size);
pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u;
pos12(6/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u);
pickup tiny.nib; pos23(bulb_diam,0); pos24(bulb_diam,90);
x23=x21-.5; top y24r=min(2x_height,h+1); top y21=x_height;
if bot y24l-x_height<tiny: y24l:=min(y24r-eps,y21+2tiny); fi
x23=x24; y23=.5[y24l,y24r]; dot(23,24); fi % dot
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto
pickup tiny.nib; filldraw stroke z21e--z22e; % right stem
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1;
pos3(bar,90); pos4(bar,90);
if serifs: x4=x21; % bar will overlap upper right serif
sloped_serif.l(21,22,g,1/3,jut,min(oo,serif_drop)); % upper right serif
dish_serif(22,21,h,1/3,inner_jut,i,1/3,jut); % lower right serif
else: rt x4=hround(.5w+2.8u); fi
pickup crisp.nib;
if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
pos4'(bar,90); x4'=x11; y4'=y4;
filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars
else: filldraw stroke z3e--z4e; fi % bar
penlabels(1,2,3,4,11,12,21,22,23,24); endchar;
cmchar "The ligature ffl";
beginchar(oct"037",15u#+4letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); lft x11l=hround(.5w-.5stem');
pos21(stem',0); rt x21r=hround(w-2.5u+.5stem');
pos22(stem',0); x21=x22; bot y22=0; top y21=h;
filldraw stroke z21e--z22e; % right stem
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround .8[stem,flare];
pos2(bulb_diam,0); x2r=x11r-stem_corr;
pos12(bulb_diam,0); x12r=x21r-stem_corr;
y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo];
sloped_serif.l(21,22,g,1/3,eps,max(serif_drop,oo)); % erase excess at top
if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u;
pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u); fi
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1;
pos3(bar,90); pos4(bar,90);
if serifs: dish_serif(22,21,h,1/3,inner_jut,i,1/3,jut); % lower right serif
pickup crisp.nib; x4=x21;
else: rt x4=hround(.5w+2.8u); fi
if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
pos4'(bar,90); x4'=x11; y4'=y4;
filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars
else: filldraw stroke z3e--z4e; fi % bar
penlabels(1,2,3,4,11,12,21,22); endchar;
endinput;
|