| 1 |
%% filename: cyrilu.mf |
| 2 |
%% version: 2.2 |
| 3 |
%% date: 1995/01/04 |
| 4 |
%% |
| 5 |
%% American Mathematical Society |
| 6 |
%% Technical Support |
| 7 |
%% Publications Technical Group |
| 8 |
%% 201 Charles Street |
| 9 |
%% Providence, RI 02904 |
| 10 |
%% USA |
| 11 |
%% tel: (401) 455-4080 |
| 12 |
%% (800) 321-4267 (USA and Canada only) |
| 13 |
%% fax: (401) 331-3842 |
| 14 |
%% email: [email protected] |
| 15 |
%% |
| 16 |
%% Copyright 1995 Humanities and Arts Computing Center, University of |
| 17 |
%% Washington. |
| 18 |
%% |
| 19 |
%% Unlimited copying and redistribution of this file are permitted as |
| 20 |
%% long as this file is not modified. Modifications, and distribution |
| 21 |
%% of modified versions, are permitted, but only if the resulting file |
| 22 |
%% is renamed. |
| 23 |
%% |
| 24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 25 |
% This file contains definitions of letters that have the same shapes in |
| 26 |
% both upper and lower case. |
| 27 |
|
| 28 |
cmchar "The Russian letter TSE"; |
| 29 |
beginchar("C",13u#+width_adj#,cap_height#,0); |
| 30 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 31 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 32 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 33 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 34 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 35 |
top y1=top y3=h; bot y2=bot y4=0; |
| 36 |
filldraw stroke z1e--z2e; % left stem |
| 37 |
filldraw stroke z3e--z4e; % right stem |
| 38 |
if serifs: numeric inner_jut; |
| 39 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 40 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 41 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 42 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif |
| 43 |
inner_jut:=.5(x3l-x1r); |
| 44 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 45 |
r_cyr_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower left serif |
| 46 |
else: |
| 47 |
lcyrsanserif(4); lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); |
| 48 |
rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); filldraw stroke z2'e--z4'e; |
| 49 |
fi |
| 50 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 51 |
|
| 52 |
cmchar "The Russian letter DE"; |
| 53 |
beginchar("D",13u#,cap_height#,0); |
| 54 |
adjust_fit(.25u#,.75u#); |
| 55 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 56 |
lft x1l=lft x2l=hround(w-3u); top y1=h; bot y2=0; |
| 57 |
x3=u+.75cap_jut; bot y3l=0; pos3(cap_hair,90); lft x3'l=x3l; bot y3'=0; |
| 58 |
if serifs: pos3'(1.5cap_hair,0); else: pos3'(cap_hair,0); fi |
| 59 |
x5=.42[x3,x1]; top y5=h; |
| 60 |
if serifs: pos5(1.5cap_hair,0); else: pos5(cap_hair,0); fi |
| 61 |
filldraw stroke z1e--z2e; |
| 62 |
filldraw stroke z3'e{z1-z3}...{up}z5e; |
| 63 |
bot y4l=0; x4=x2r; pos4(cap_hair,90); |
| 64 |
%filldraw stroke z3e--z4e; |
| 65 |
pickup crisp.nib; |
| 66 |
top y6=h; x6-.75cap_jut=rt x1r; pos6(slab,90); |
| 67 |
x9=x5; y9r=0; pos9(cap_hair,90); |
| 68 |
if serifs: |
| 69 |
numeric inner_jut; |
| 70 |
inner_jut=.5(x1-x5); |
| 71 |
nodish_serif(5,9,aa,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 72 |
nodish_serif(1,2,ae,1/3,inner_jut,f,1/3,cap_jut); % upper right serif |
| 73 |
inner_jut:=.5(x2-x3); |
| 74 |
l_cyr_serif(3',1,ac,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 75 |
r_cyr_serif(2,1,ag,1/3,inner_jut,h,1/3,cap_jut); % lower right serif |
| 76 |
else: |
| 77 |
cyrsanserif(3'); lcyrsanserif(2); |
| 78 |
x5'=lft x5l; top y5'=h; pos5'(slab,90); |
| 79 |
filldraw stroke z3e--z4e; filldraw stroke z5'e--z6e; |
| 80 |
fi |
| 81 |
endchar; |
| 82 |
|
| 83 |
cmchar "The Russian letter GHE (looks like Gamma)"; |
| 84 |
beginchar("G",11.5u#-width_adj#,cap_height#,0); |
| 85 |
italcorr cap_height#*slant-beak_jut#-.25u#; |
| 86 |
adjust_fit(cap_serif_fit#,0); |
| 87 |
h:=vround(h-stem_corr); |
| 88 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 89 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; |
| 90 |
filldraw stroke z1e--z2e; % stem |
| 91 |
pickup crisp.nib; pos3(slab,90); pos4(hair,0); |
| 92 |
top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps; |
| 93 |
arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak |
| 94 |
pos5(cap_bar,-90); pos6(hair,0); |
| 95 |
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; |
| 96 |
pos0(cap_bar,90); pos7(hair,0); |
| 97 |
z0=z5; x6=x7; y6-y5l=y0l-y7; |
| 98 |
if serifs: rt x6r=hround(w-4u+.5hair); y6=good.y(y5l+.6beak)+eps; |
| 99 |
rt x9r=hround(w-.5u); |
| 100 |
else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); |
| 101 |
fi |
| 102 |
%arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif |
| 103 |
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif |
| 104 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); % lower serif |
| 105 |
fi |
| 106 |
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar; |
| 107 |
|
| 108 |
cmchar "The Russian letter KHA (looks like X)"; |
| 109 |
beginchar("H",13u#,cap_height#,0); |
| 110 |
italcorr cap_height#*slant-.25u#; |
| 111 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 112 |
numeric stem[],outer_jut,xjut,alpha[]; |
| 113 |
stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); |
| 114 |
outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; |
| 115 |
x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; |
| 116 |
x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut; |
| 117 |
y1=y2=h; y3=y4=0; |
| 118 |
alpha1=diag_ratio(1,stem1,h,x4r-x1l); |
| 119 |
alpha2=diag_ratio(1,stem2,h,x2r-x3l); |
| 120 |
penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); |
| 121 |
penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); |
| 122 |
if hefty: z0=whatever[z1,z4]=whatever[z2,z3]; |
| 123 |
x12=x34=x0; y13=y24=y0; |
| 124 |
z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; |
| 125 |
z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; |
| 126 |
forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor |
| 127 |
fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' |
| 128 |
--diag_end(34',4l,.5,1,4r,24')--z24' |
| 129 |
--diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals |
| 130 |
else: fill diag_end(4r,1r,.5,1,1l,4l) |
| 131 |
--diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal |
| 132 |
fill diag_end(2l,3l,.5,1,3r,2r) |
| 133 |
--diag_end(3r,2r,.5,1,2l,3l)--cycle; % right diagonal |
| 134 |
fi |
| 135 |
if serifs: numeric inner_jut[]; pickup tiny.nib; |
| 136 |
prime_points_inside(1,4); prime_points_inside(2,3); |
| 137 |
prime_points_inside(3,2); prime_points_inside(4,1); |
| 138 |
if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; |
| 139 |
else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi |
| 140 |
if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut; |
| 141 |
else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi |
| 142 |
dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif |
| 143 |
dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif |
| 144 |
dish_serif(2',3,e,2/3,inner_jut1+xjut, |
| 145 |
f,1/2,outer_jut+xjut)(dark); % upper right serif |
| 146 |
dish_serif(3',2,g,1/2,outer_jut+xjut, |
| 147 |
h,2/3,inner_jut2+xjut)(dark); % lower left serif |
| 148 |
fi |
| 149 |
math_fit(0,.5ic#); penlabels(0,1,2,3,4,12,13,24,34); endchar; |
| 150 |
|
| 151 |
cmchar "The Russian letter I (looks like backwards N)"; |
| 152 |
beginchar("I",14u#+width_adj#,cap_height#,0); |
| 153 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 154 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 155 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 156 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 157 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 158 |
top y1=top y3=h; bot y2=bot y4=0; |
| 159 |
filldraw stroke z1e--z2e; % left stem |
| 160 |
filldraw stroke z3e--z4e; % right stem |
| 161 |
if serifs: penpos5(.85cap_stem,90); penpos6(.85cap_stem,90); |
| 162 |
else: penpos5(cap_stem,90); penpos6(cap_stem,90); |
| 163 |
fi |
| 164 |
x5=x1r; x6=x3l; if serifs: y5=.1h; y6=.9h; else: bot y5l=0; top y6r=h; fi |
| 165 |
fill stroke z5e--z6e; % bar |
| 166 |
if serifs: numeric inner_jut; |
| 167 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 168 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 169 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 170 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 171 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif |
| 172 |
dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower left serif |
| 173 |
fi |
| 174 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 175 |
|
| 176 |
% The letter "K" is the last character defined in this file. |
| 177 |
% See below for comments. |
| 178 |
|
| 179 |
cmchar "The Russian letter EL"; |
| 180 |
beginchar("L",13u#,cap_height#,0); |
| 181 |
adjust_fit(0,1.5u#); |
| 182 |
numeric ldot_size; ldot_size=1.15flare; |
| 183 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 184 |
lft x1l=lft x2l=hround(w-3u); top y1=h; bot y2=0; |
| 185 |
filldraw stroke z1e--z2e; |
| 186 |
if serifs: |
| 187 |
numeric inner_jut; inner_jut=.5(x1-x5); |
| 188 |
x4=u+.5ldot_size; x3=x4+.5ldot_size; bot y3r=0; pos3(1.5cap_hair,-90); |
| 189 |
x5=.42[x4,x1]; top y5=h; pos5(1.5cap_hair,0); pos4(ldot_size,-180); |
| 190 |
pos10(hair,-180); |
| 191 |
filldraw stroke z3e{right}...{up}z5e; |
| 192 |
y4=ldot_size; bulb(3,10,4); |
| 193 |
dish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); |
| 194 |
nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); |
| 195 |
top y6=h; x6-.75cap_jut=rt x1r; pos6(slab,90); |
| 196 |
x5'+.5cap_jut=lft x5l; top y5'=h; pos5'(slab,90); |
| 197 |
x9=x5; y9=0; pos9(cap_hair,0); |
| 198 |
nodish_serif(5,9,aa,1/3,cap_jut,ab,1/3,inner_jut); % upper left serif |
| 199 |
else: |
| 200 |
x5r=hround u; bot y5r=vround(.06h-o); bot y4r=-o; x4r=.35[x5,x3r]; |
| 201 |
x3=x5+3flare; top y3=h; lft x3'=lft x3l; top y3'r=h; rt x1'r=rt x1r; |
| 202 |
top y1'r=h; pos3'(slab,90); pos1'(slab,90); pos5(flare,-120); pos4(vair,-90); |
| 203 |
pos3(hair,0); |
| 204 |
filldraw stroke z5e...{right}z4e...{up}z3e; |
| 205 |
filldraw stroke z3'e--z1'e; |
| 206 |
fi |
| 207 |
endchar; |
| 208 |
|
| 209 |
cmchar "The Russian letter EM"; |
| 210 |
beginchar("M",16u#+width_adj#,cap_height#,0); |
| 211 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 212 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 213 |
numeric stem[]; % thicknesses of the four strokes |
| 214 |
stem1=hround(fudged.hair+stem_corr); |
| 215 |
stem2=hround(fudged.cap_stem-4stem_corr); |
| 216 |
stem3=hround(fudged.hair-stem_corr); |
| 217 |
stem4=hround(fudged.cap_stem-3stem_corr); |
| 218 |
if stem4<stem1: stem4:=stem1; fi |
| 219 |
pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); |
| 220 |
pos3(stem4,0); pos4(stem4,0); |
| 221 |
x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4); |
| 222 |
top y1=top y3=h; bot y2=bot y4=0; |
| 223 |
filldraw stroke z1e--z2e; % left stem |
| 224 |
filldraw stroke z3e--z4e; % right stem |
| 225 |
penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); |
| 226 |
x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; |
| 227 |
if hefty: y6=if monospace: vround 1/3h else: o fi; |
| 228 |
numeric upper_notch,lower_notch; |
| 229 |
upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut; |
| 230 |
x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; |
| 231 |
z0=whatever[z5r,z6r]=whatever[z7l,z8l]; |
| 232 |
fill z5l.. |
| 233 |
if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi |
| 234 |
{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} |
| 235 |
if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi |
| 236 |
..z8r--diag_out(8r,1,8l,7l){z7-z8} |
| 237 |
if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. |
| 238 |
else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi |
| 239 |
{z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals |
| 240 |
else: y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; |
| 241 |
fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} |
| 242 |
..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} |
| 243 |
..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals |
| 244 |
if serifs: serif(1,2,a,1/3,-cap_jut); % upper left serif |
| 245 |
dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif |
| 246 |
serif(3,4,d,1/3,cap_jut); % upper right serif |
| 247 |
dish_serif(4,3,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower right serif |
| 248 |
math_fit(0,max(.5ic#-.5u#,0)); |
| 249 |
penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar; |
| 250 |
|
| 251 |
cmchar "The Russian letter EN (looks like H)"; |
| 252 |
beginchar("N",13u#+width_adj#,cap_height#,0); |
| 253 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 254 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 255 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 256 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 257 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 258 |
top y1=top y3=h; bot y2=bot y4=0; |
| 259 |
filldraw stroke z1e--z2e; % left stem |
| 260 |
filldraw stroke z3e--z4e; % right stem |
| 261 |
penpos5(cap_bar,90); penpos6(cap_bar,90); |
| 262 |
x5=x1; x6=x3; y5=y6=.52h; |
| 263 |
fill stroke z5e--z6e; % bar |
| 264 |
if serifs: numeric inner_jut; |
| 265 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 266 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 267 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 268 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 269 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif |
| 270 |
dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower left serif |
| 271 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 272 |
|
| 273 |
cmchar "The Russian letter PE (looks like PI)"; |
| 274 |
beginchar("P",13u#+width_adj#,cap_height#,0); |
| 275 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 276 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 277 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 278 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 279 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 280 |
top y1=top y3=h; bot y2=bot y4=0; |
| 281 |
filldraw stroke z1e--z2e; % left stem |
| 282 |
filldraw stroke z3e--z4e; % right stem |
| 283 |
if serifs: numeric inner_jut; |
| 284 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 285 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 286 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 287 |
dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower left serif |
| 288 |
inner_jut:=.5(x3l-x1r); |
| 289 |
nodish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 290 |
nodish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif |
| 291 |
else: |
| 292 |
lft x1'= lft x1l; top y1'r=h; pos1'(slab,90); |
| 293 |
rt x3'=rt x3r; y3'=y1'; pos3'(slab,90); filldraw stroke z1'e--z3'e; |
| 294 |
fi |
| 295 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 296 |
|
| 297 |
cmchar "The Russian letter CHE"; |
| 298 |
beginchar("Q",14u#+width_adj#,cap_height#,0); |
| 299 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 300 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 301 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 302 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 303 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 304 |
top y1=top y3=h; %bot y2=x_height; |
| 305 |
bot y4=0; |
| 306 |
x22=x3; y22=.65h; %x_height-.25bar_height; |
| 307 |
pos22(cap_bar,90); y2=y22; |
| 308 |
filldraw stroke z1e--z2e{down}...{1,2}z22e; % left stem and bowl |
| 309 |
filldraw stroke z3e--z4e; % right stem |
| 310 |
if serifs: numeric inner_jut; |
| 311 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 312 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 313 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 314 |
% dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 315 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif |
| 316 |
dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower left serif |
| 317 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 318 |
|
| 319 |
cmchar "The Russian letter TE"; |
| 320 |
beginchar("T",13u#-width_adj#,cap_height#,0); |
| 321 |
italcorr cap_height#*slant-beak_jut#-.25u#; |
| 322 |
adjust_fit(0,0); |
| 323 |
h:=vround(h-2stem_corr); |
| 324 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 325 |
lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; |
| 326 |
filldraw stroke z1e--z2e; % stem |
| 327 |
pickup crisp.nib; pos3(slab,90); pos4(hair,0); |
| 328 |
top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak)-eps; |
| 329 |
arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak |
| 330 |
pos5(hair,180); x5=w-x4; y5=y4; |
| 331 |
arm(3,5,f,beak_darkness,-.7beak_jut); % left arm and beak |
| 332 |
if serifs: dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,1.414cap_jut); % lower serif |
| 333 |
nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); fi % upper bracketing |
| 334 |
math_fit(-.75cap_height#*slant,ic#-2.5u#); penlabels(1,2,3,4,5,6); endchar; |
| 335 |
|
| 336 |
cmchar "The Russian letter VE (looks like B)"; |
| 337 |
beginchar("V",12.5u#,cap_height#,0); |
| 338 |
italcorr .75cap_height#*slant-.5u#; |
| 339 |
adjust_fit(cap_serif_fit#,0); |
| 340 |
numeric left_stem,right_curve,middle_weight; |
| 341 |
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5; |
| 342 |
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); |
| 343 |
lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; |
| 344 |
filldraw stroke z1e--z2e; % stem |
| 345 |
penpos3(cap_band,90); penpos4(cap_band,90); |
| 346 |
penpos6(middle_weight,-90); penpos7(middle_weight,-90); |
| 347 |
penpos8(middle_weight,90); penpos9(middle_weight,90); |
| 348 |
penpos5(right_curve-stem_corr,0); penpos10(right_curve,0); |
| 349 |
penpos11(cap_band,-90); penpos12(cap_band,-90); |
| 350 |
z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair; |
| 351 |
z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h; |
| 352 |
x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u; |
| 353 |
x5r=hround(w-1.5u); x10r=hround(w-u); |
| 354 |
if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u]; |
| 355 |
else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u]; |
| 356 |
x4l:=x4l-.5u; x9l:=x9l-.5u; fi |
| 357 |
x6l:=x6l-.5u; x11l:=x11l-.5u; |
| 358 |
fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e; % upper lobe |
| 359 |
fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e; % lower lobe |
| 360 |
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif |
| 361 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif |
| 362 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 363 |
|
| 364 |
cmchar "The Russian letter SHCHA"; |
| 365 |
beginchar("W",19u#+width_adj#,cap_height#,0); |
| 366 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 367 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 368 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 369 |
pos3(cap_stem,0); pos4(cap_stem,0); pos5(cap_stem,0); pos6(cap_stem,0); |
| 370 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 371 |
top y1=top y3=h; bot y2=bot y4=0; |
| 372 |
z5=.5[z1,z3]; z6=.5[z2,z4]; |
| 373 |
filldraw stroke z1e--z2e; % left stem |
| 374 |
filldraw stroke z3e--z4e; % right stem |
| 375 |
filldraw stroke z5e--z6e; % center stem |
| 376 |
if serifs: numeric inner_jut; |
| 377 |
if rt x1r+cap_jut+.5u+1<=lft x5l-cap_jut: inner_jut=cap_jut; |
| 378 |
else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi |
| 379 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 380 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif |
| 381 |
dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif |
| 382 |
inner_jut:=.5(x3l-x5r); |
| 383 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 384 |
nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif |
| 385 |
r_cyr_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif |
| 386 |
else: |
| 387 |
lcyrsanserif(4); lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); |
| 388 |
rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); filldraw stroke z2'e--z4'e; |
| 389 |
fi |
| 390 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 391 |
|
| 392 |
cmchar "The Russian letter SHA"; |
| 393 |
beginchar("X",19u#+width_adj#,cap_height#,0); |
| 394 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 395 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 396 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 397 |
pos3(cap_stem,0); pos4(cap_stem,0); pos5(cap_stem,0); pos6(cap_stem,0); |
| 398 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 399 |
top y1=top y3=h; bot y2=bot y4=0; |
| 400 |
z5=.5[z1,z3]; z6=.5[z2,z4]; |
| 401 |
filldraw stroke z1e--z2e; % left stem |
| 402 |
filldraw stroke z3e--z4e; % right stem |
| 403 |
filldraw stroke z5e--z6e; % center stem |
| 404 |
if serifs: numeric inner_jut; |
| 405 |
if rt x1r+cap_jut+.5u+1<=lft x5l-cap_jut: inner_jut=cap_jut; |
| 406 |
else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi |
| 407 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 408 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif |
| 409 |
dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif |
| 410 |
inner_jut:=.5(x3l-x5r); |
| 411 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 412 |
nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif |
| 413 |
nodish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif |
| 414 |
else: |
| 415 |
lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); |
| 416 |
rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); filldraw stroke z2'e--z4'e; |
| 417 |
fi |
| 418 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 419 |
|
| 420 |
cmchar "The Russian letter ERY"; |
| 421 |
beginchar("Y",12.5u#,cap_height#,0); |
| 422 |
italcorr .75cap_height#*slant-.5u#; |
| 423 |
adjust_fit(cap_serif_fit#,if serifs: 5u# else: 4.25u# fi); |
| 424 |
numeric left_stem,right_curve,middle_weight; |
| 425 |
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5; |
| 426 |
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); |
| 427 |
lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; |
| 428 |
filldraw stroke z1e--z2e; % stem |
| 429 |
penpos3(cap_band,90); penpos4(cap_band,90); |
| 430 |
penpos6(middle_weight,-90); penpos7(middle_weight,-90); |
| 431 |
penpos8(middle_weight,90); penpos9(middle_weight,90); |
| 432 |
penpos5(right_curve-stem_corr,0); penpos10(right_curve,0); |
| 433 |
penpos11(cap_band,-90); penpos12(cap_band,-90); |
| 434 |
z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair; |
| 435 |
z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h; |
| 436 |
x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u; |
| 437 |
x5r=hround(w-1.5u); x10r=hround(w-u); |
| 438 |
if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u]; |
| 439 |
else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u]; |
| 440 |
x4l:=x4l-.5u; x9l:=x9l-.5u; fi |
| 441 |
x6l:=x6l-.5u; x11l:=x11l-.5u; |
| 442 |
fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e; % lower lobe |
| 443 |
if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper serif |
| 444 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif |
| 445 |
pickup tiny.nib; |
| 446 |
x80=x81=w if serifs: +2u else: +1.25u fi; top y80=h; bot y81=0; pos80(cap_stem,0); pos81(cap_stem,0); |
| 447 |
filldraw stroke z80e--z81e; |
| 448 |
if serifs: |
| 449 |
dish_serif(80,81,e,1/3,cap_jut,f,1/3,cap_jut); |
| 450 |
dish_serif(81,80,g,1/3,cap_jut,h,1/3,cap_jut); |
| 451 |
fi |
| 452 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 453 |
|
| 454 |
cmchar "The Russian letter ZE (looks like numeral 3)"; |
| 455 |
beginchar("Z",11u#,cap_height#,0); |
| 456 |
italcorr cap_height#*slant-.5u#; |
| 457 |
adjust_fit(0,0); |
| 458 |
numeric top_thickness,mid_thickness,bot_thickness; |
| 459 |
top_thickness=max(fine.breadth,vround(slab-2vair_corr)); |
| 460 |
mid_thickness=max(fine.breadth,vround 2/3vair); |
| 461 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 462 |
pickup fine.nib; pos2(top_thickness,90); top y2r=h+o; |
| 463 |
pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0); |
| 464 |
rt x3r=hround(w-1.25u); |
| 465 |
pos4(vair,-90); pos5(vair,-90); |
| 466 |
pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7]; |
| 467 |
pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6)-eps; |
| 468 |
pos8(bot_thickness,-90); bot y8r=-o; |
| 469 |
y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l]; |
| 470 |
top y5l=vround(.54h+.5vair); y5r=y6l; |
| 471 |
x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h); |
| 472 |
lft x1r=hround 1.25u; y1=.8h; |
| 473 |
if serifs: pos1(cap_hair,180); pos9(cap_hair,-180); else: pos1(1.5cap_hair,135); pos9(1.5cap_hair,-135); fi |
| 474 |
lft x9r=hround .75u; y9=.2h; |
| 475 |
filldraw stroke z1e{x2-x1,10(y2-y1)}...{right}z2e & pulled_super_arc.e(2,3)(.5superpull) |
| 476 |
& z3e{down}...z4e---z5e; % upper bowl |
| 477 |
filldraw z5r--z6l--z6r--z5l---cycle; % middle tip |
| 478 |
filldraw stroke pulled_super_arc.e(6,7)(.5superpull) |
| 479 |
& pulled_super_arc.e(7,8)(.5superpull) |
| 480 |
& z8e{left}....{up}z9e; % lower bowl %this line added for changing bulb to barb |
| 481 |
if serifs: numeric bulb_diam[]; |
| 482 |
%bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem; |
| 483 |
%pos0(bulb_diam1,180); pos1(hair,180); |
| 484 |
%lft x0r=hround 1.25u; y0=min(.9h-.5bulb_diam1,.75h+.5bulb_diam1); |
| 485 |
% bulb(2,1,0); % upper bulb |
| 486 |
%pos10(bulb_diam2,-180); |
| 487 |
% bulb(8,9,10); % lower bulb |
| 488 |
% barbs on end of strokes |
| 489 |
path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..{right}z2; |
| 490 |
path lower_arc; lower_arc=z8{left}....{up}z9; |
| 491 |
pos20(hair,0); x20r=x1l; top y20=top y2r; x1'-x1l=1.6cap_curve; y1'=y1; |
| 492 |
numeric t; t=xpart(upper_arc intersectiontimes (z20r--z1')); |
| 493 |
filldraw z1r--z20l--z20r--subpath(t,0) of upper_arc--cycle; |
| 494 |
pos30(hair,0); x30r=x9l; bot y30=bot y8r; x9'-x9l=1.6cap_curve; y9'=y9; |
| 495 |
t:=xpart(lower_arc intersectiontimes (z30r--z9')); |
| 496 |
filldraw z9r--z30l--z30r--subpath(t,1) of lower_arc--cycle; |
| 497 |
%else: %pos1(.5[vair,flare],angle(-8u,h)); |
| 498 |
%lft x1r=hround u; bot y1l=vround .75h+o; |
| 499 |
%y1r:=good.y y1r+eps; x1l:=good.x x1l; |
| 500 |
%pos9(bot_thickness,angle(-2u,-h)); |
| 501 |
%lft x9r=hround .75u; top y9l=vround .25h-o; |
| 502 |
%y9r:=good.y y9r-eps; x9l:=good.x x9l; |
| 503 |
% filldraw stroke term.e(2,1,left,1,4); % upper terminal |
| 504 |
% filldraw stroke term.e(8,9,left,1,4); |
| 505 |
fi % lower terminal |
| 506 |
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; |
| 507 |
|
| 508 |
cmchar "The Russian letter Soft Sign"; |
| 509 |
beginchar(oct"136",12.5u#,cap_height#,0); |
| 510 |
italcorr .75cap_height#*slant-.5u#; |
| 511 |
adjust_fit(cap_serif_fit#,0); |
| 512 |
numeric left_stem,right_curve,middle_weight; |
| 513 |
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5; |
| 514 |
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); |
| 515 |
lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; |
| 516 |
filldraw stroke z1e--z2e; % stem |
| 517 |
penpos3(cap_band,90); penpos4(cap_band,90); |
| 518 |
penpos6(middle_weight,-90); penpos7(middle_weight,-90); |
| 519 |
penpos8(middle_weight,90); penpos9(middle_weight,90); |
| 520 |
penpos5(right_curve-stem_corr,0); penpos10(right_curve,0); |
| 521 |
penpos11(cap_band,-90); penpos12(cap_band,-90); |
| 522 |
z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair; |
| 523 |
z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h; |
| 524 |
x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u; |
| 525 |
x5r=hround(w-1.5u); x10r=hround(w-u); |
| 526 |
if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u]; |
| 527 |
else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u]; |
| 528 |
x4l:=x4l-.5u; x9l:=x9l-.5u; fi |
| 529 |
x6l:=x6l-.5u; x11l:=x11l-.5u; |
| 530 |
fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e; % lower lobe |
| 531 |
if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper serif |
| 532 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif |
| 533 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 534 |
|
| 535 |
cmchar "The Russian letter Hard Sign"; |
| 536 |
beginchar(oct"137",12.5u#,cap_height#,0); |
| 537 |
italcorr .75cap_height#*slant-.5u#; |
| 538 |
adjust_fit(if serifs: 4 else: 2 fi u#+cap_serif_fit#,0); |
| 539 |
numeric left_stem,right_curve,middle_weight; |
| 540 |
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5; |
| 541 |
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); |
| 542 |
lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; |
| 543 |
filldraw stroke z1e--z2e; % stem |
| 544 |
penpos3(cap_band,90); penpos4(cap_band,90); |
| 545 |
penpos6(middle_weight,-90); penpos7(middle_weight,-90); |
| 546 |
penpos8(middle_weight,90); penpos9(middle_weight,90); |
| 547 |
penpos5(right_curve-stem_corr,0); penpos10(right_curve,0); |
| 548 |
penpos11(cap_band,-90); penpos12(cap_band,-90); |
| 549 |
z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair; |
| 550 |
z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h; |
| 551 |
x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u; |
| 552 |
x5r=hround(w-1.5u); x10r=hround(w-u); |
| 553 |
if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u]; |
| 554 |
else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u]; |
| 555 |
x4l:=x4l-.5u; x9l:=x9l-.5u; fi |
| 556 |
x6l:=x6l-.5u; x11l:=x11l-.5u; |
| 557 |
%fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e; % upper lobe |
| 558 |
fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e; % lower lobe |
| 559 |
if serifs: nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper serif |
| 560 |
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif |
| 561 |
pickup crisp.nib; |
| 562 |
top y55r=h; x55=x1; pos55(slab,90); pos56(hair,180); x56=x1-if serifs: 6 else: 3 fi u; |
| 563 |
y56=good.y(y55l-beak)-eps; |
| 564 |
arm(55,56,q,beak_darkness**.8,-.4beak_jut); |
| 565 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; |
| 566 |
|
| 567 |
% The shape "K" is saved as a picture, to be used by the next file input. |
| 568 |
% It is defined here to minimize storage time. |
| 569 |
cmchar "The Russian letter KA"; |
| 570 |
beginchar("K",12u#,cap_height#,0); |
| 571 |
italcorr cap_height#*slant-.5u#; |
| 572 |
adjust_fit(0,.25u#); |
| 573 |
pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); |
| 574 |
lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; |
| 575 |
filldraw stroke z1e--z2e; % stem |
| 576 |
if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif |
| 577 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower stem serif |
| 578 |
% pickup fine.nib; pos3(vair,90); x3=x1; y3=.55h; x3'=x3; y3'=y3+1; pos3'(slab,90); |
| 579 |
pickup fine.nib; pos3(vair,90); x3=x1; y3=.55h; z3'=z3; pos3'(varwid,90); |
| 580 |
% pos4(vair,90); x4=w-2u; top y4r=h+oo; |
| 581 |
pos4(varwid,90); x4=w-.75flare-.125u; top y4r=h+oo; %original x4=w-2u |
| 582 |
% filldraw stroke z3'e{right}..{right}z4e; % upper diagonal |
| 583 |
x41=x4; y41=y3'; x42=x4-2u; y42=y4; |
| 584 |
filldraw stroke z3'e..controls z41 and z42..z4e; % upper diagonal |
| 585 |
pos5(hair,0); pos6(flare,0); |
| 586 |
rt x5r=hround(w-.125u); y5+.5flare=vround(top y4r-hair)+1; %original bot y4l-.03h |
| 587 |
top y4'r=top y4r; x4'=x4; pos4'(hair,90); |
| 588 |
bulb(4',5,6); % bulb |
| 589 |
% pos7(stem,0); pos8(vair,90); pos9(hair,180); |
| 590 |
pos7(stem,0); pos8(varwid,90); pos9(hair,180); |
| 591 |
x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; |
| 592 |
lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; |
| 593 |
filldraw stroke z3e{right}...z7e{down} |
| 594 |
...z8e{right}...{up}z9e; % lower diagonal |
| 595 |
else: |
| 596 |
numeric right_jut,stem[],alpha[]; |
| 597 |
right_jut=.4tiny; |
| 598 |
pickup tiny.nib; |
| 599 |
stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); |
| 600 |
stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); |
| 601 |
top y3=h; rt x3r=hround(r-letter_fit-u-right_jut); |
| 602 |
bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut); |
| 603 |
x4=x1; y4=1/3h; |
| 604 |
alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); |
| 605 |
penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); |
| 606 |
alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); |
| 607 |
penpos6(alpha2*(stem2-tiny),0); |
| 608 |
forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4); |
| 609 |
z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor |
| 610 |
%forsuffixes $=l,r: x5$:=x5$+.5u; y5$:=y5$-.5u; endfor |
| 611 |
z5=.5[z5l,z5r]; |
| 612 |
z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); |
| 613 |
% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] |
| 614 |
z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); |
| 615 |
z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); |
| 616 |
% fill z4r{right}..diag_end(4r,3'r,1,.5,3'l,4l)..{left}z4l--cycle; % upper diagonal |
| 617 |
fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal |
| 618 |
fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal |
| 619 |
fi |
| 620 |
picture K_pic; K_pic=currentpicture; |
| 621 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |