Debian Codegraph @

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

raw
1 % This file describes five roman ligatures that begin with `f'
2 % and puts them in code positions \0013--\0017.
3 % Modified by WaS for the CM Bright fonts in 1995.
4 numeric itc#; % modified italic correction on `f' and `ff'
5 itc#=if serifs: max(0,flare#-.25u#) else: 1.25u# fi;
6
7 ligtable "f": "i"=:oct"014", "f"=:oct"013", "l"=:oct"015",
8 "'" kern itc#, "?" kern itc#, "!" kern itc#, ")" kern itc#, "]" kern itc#;
9 ligtable oct"013": "i"=:oct"016", "l"=:oct"017",
10 "'" kern itc#, "?" kern itc#, "!" kern itc#, ")" kern itc#, "]" kern itc#;
11
12 cmchar "The ligature ff";
13 beginchar(oct"013",10.5u#+2letter_fit#,asc_height#,0);
14 italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi;
15 adjust_fit(0,0);
16 pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
17 pos11(stem',0); rt x11r=hround(w-3u+.5stem');
18 pickup fine.nib; numeric bulb_diam, inner_jut;
19 if serifs: bulb_diam=hround .8[stem,flare];
20 pos2(bulb_diam,0); pos12(bulb_diam,0);
21 rt x2r=hround(rt x11r-stem_corr); lft x12l=hround(w-.75u+.5);
22 y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo];
23 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
24 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
25 else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 6.25u;
26 pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(w+.75u); fi
27 f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
28 f_stroke(11,12,d,e,f,inner_jut,1.25jut); % right stem, arc, terminal, serif
29 pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
30 pos3(bar,90); pos4(bar,90);
31 rt x4=hround(w-1/3u);
32 if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
33 pos4'(bar,90); x4'=x11; y4'=y4;
34 filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars
35 else: filldraw stroke z3e--z4e; fi % bar
36 penlabels(1,2,3,4,11,12); endchar;
37
38 cmchar "The ligature fi";
39 beginchar(oct"014",10u#+2letter_fit#,asc_height#,0);
40 numeric dot_diam#;
41 % diameter of dot = stem width of `i'
42 dot_diam#=stem'/hppp;
43 italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_diam# fi-2u#;
44 adjust_fit(0,serif_fit#);
45 pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
46 pos11(stem',0); rt x11r=hround(w-2.5u+.5stem');
47 pos12(stem',0); x11=x12; bot y12=0;
48 pickup fine.nib; numeric bulb_diam, inner_jut;
49 if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size];
50 pos2(bulb_diam,0); x2r=x12r;
51 y2+.5bulb_diam=.8[x_height,h+oo]; top y11=x_height+min(oo,serif_drop);
52 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
53 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
54 else: bulb_diam=stem';
55 pos2(6/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u;
56 pickup tiny.nib; pos13(bulb_diam,0); pos14(bulb_diam,90);
57 x13=x11-.5; top y14r=min(2x_height,h+1); top y11=x_height;
58 if bot y14l-x_height<tiny: y14l:=min(y14r-eps,y11+2tiny); fi
59 x13=x14; y13=.5[y14l,y14r]; dot(13,14); % dot
60 fi; % this is the ligature we're drawing
61 f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
62 pickup tiny.nib; filldraw stroke z11e--z12e; % right stem
63 pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
64 pos3(bar,90); pos4(bar,90);
65 if serifs: x4=x11; % bar will overlap upper right serif
66 sloped_serif.l(11,12,d,1/3,jut,min(oo,serif_drop)); % upper right serif
67 dish_serif(12,11,e,1/3,inner_jut,f,1/3,jut); % lower right serif
68 else: rt x4= hround 5.3u; fi
69 pickup crisp.nib; filldraw stroke z3e--z4e; % bar
70 penlabels(1,2,3,4,11,12,13,14); endchar;
71
72 cmchar "The ligature fl";
73 beginchar(oct"015",10u#+2letter_fit#,asc_height#,0);
74 italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
75 adjust_fit(0,serif_fit#);
76 pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
77 pos11(stem',0); rt x11r=hround(w-2.5u+.5stem');
78 pos12(stem',0); x11=x12; bot y12=0; top y11=h;
79 filldraw stroke z11e--z12e; % right stem
80 pickup fine.nib; numeric bulb_diam, inner_jut;
81 if serifs: bulb_diam=hround .8[stem,flare];
82 pos2(bulb_diam,0); x2r=x11r-stem_corr;
83 y2+.5bulb_diam=.9[x_height,h+oo];
84 sloped_serif.l(11,12,d,1/3,eps,max(serif_drop,oo)); % erase excess at top
85 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
86 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
87 else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u; fi
88 f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
89 pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
90 pos3(bar,90); pos4(bar,90);
91 if serifs: x4=x11;
92 dish_serif(12,11,e,1/3,inner_jut,f,1/3,jut); % lower right serif
93 else: rt x4= hround 5.3u; fi
94 pickup crisp.nib; filldraw stroke z3e--z4e; % bar
95 penlabels(1,2,3,4,11,12); endchar;
96
97 cmchar "The ligature ffi";
98 beginchar(oct"016",15u#+4letter_fit#,asc_height#,0);
99 numeric dot_diam#;
100 % diameter of dot = stem width of `i', if we don't make serifs;
101 % do the same trick later once more with the unsharped dimension:
102 if serifs: dot_diam#=dot_size# else: dot_diam#=stem'/hppp fi;
103 italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_diam# fi-2u#;
104 adjust_fit(0,serif_fit#);
105 pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
106 pos11(stem',0); lft x11l=hround(.5w-.5stem');
107 pos21(stem',0); rt x21r=hround(w-2.5u+.5stem');
108 pos22(stem',0); x21=x22; bot y22=0;
109 pickup fine.nib; numeric bulb_diam, inner_jut;
110 if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size];
111 pos2(bulb_diam,0); x2r=x11r-stem_corr;
112 pos12(bulb_diam,0); x12r=x21r;
113 top y21=x_height+min(oo,serif_drop);
114 y2+.5bulb_diam=.8[x_height,h+oo]; y12=y2;
115 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
116 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
117 else: bulb_diam=stem';
118 pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u;
119 pos12(6/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u);
120 pickup tiny.nib; pos23(bulb_diam,0); pos24(bulb_diam,90);
121 x23=x21-.5; top y24r=min(2x_height,h+1); top y21=x_height;
122 if bot y24l-x_height<tiny: y24l:=min(y24r-eps,y21+2tiny); fi
123 x23=x24; y23=.5[y24l,y24r]; dot(23,24); fi % dot
124 f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
125 f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto
126 pickup tiny.nib; filldraw stroke z21e--z22e; % right stem
127 pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1;
128 pos3(bar,90); pos4(bar,90);
129 if serifs: x4=x21; % bar will overlap upper right serif
130 sloped_serif.l(21,22,g,1/3,jut,min(oo,serif_drop)); % upper right serif
131 dish_serif(22,21,h,1/3,inner_jut,i,1/3,jut); % lower right serif
132 else: rt x4=hround(.5w+2.8u); fi
133 pickup crisp.nib;
134 if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
135 pos4'(bar,90); x4'=x11; y4'=y4;
136 filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars
137 else: filldraw stroke z3e--z4e; fi % bar
138 penlabels(1,2,3,4,11,12,21,22,23,24); endchar;
139
140 cmchar "The ligature ffl";
141 beginchar(oct"017",15u#+4letter_fit#,asc_height#,0);
142 italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
143 adjust_fit(0,serif_fit#);
144 pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
145 pos11(stem',0); lft x11l=hround(.5w-.5stem');
146 pos21(stem',0); rt x21r=hround(w-2.5u+.5stem');
147 pos22(stem',0); x21=x22; bot y22=0; top y21=h;
148 filldraw stroke z21e--z22e; % right stem
149 pickup fine.nib; numeric bulb_diam, inner_jut;
150 if serifs: bulb_diam=hround .8[stem,flare];
151 pos2(bulb_diam,0); x2r=x11r-stem_corr;
152 pos12(bulb_diam,0); x12r=x21r-stem_corr;
153 y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo];
154 sloped_serif.l(21,22,g,1/3,eps,max(serif_drop,oo)); % erase excess at top
155 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
156 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
157 else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u;
158 pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u); fi
159 f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
160 f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto
161 pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1;
162 pos3(bar,90); pos4(bar,90);
163 if serifs: dish_serif(22,21,h,1/3,inner_jut,i,1/3,jut); % lower right serif
164 pickup crisp.nib; x4=x21;
165 else: rt x4=hround(.5w+2.8u); fi
166 if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
167 pos4'(bar,90); x4'=x11; y4'=y4;
168 filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars
169 else: filldraw stroke z3e--z4e; fi % bar
170 penlabels(1,2,3,4,11,12,21,22); endchar;