| 1 |
%% filename: serb.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 is serb.mf containing serbian and other letters with offsets |
| 26 |
%of 8 between upper and lower case |
| 27 |
|
| 28 |
% The letter "ZHE" is first in this file because it uses the picture "K" |
| 29 |
% saved from the end of the previous file. |
| 30 |
cmchar "The Russian letter ZHE"; |
| 31 |
beginchar(oct"021",12u#,cap_height#,0); |
| 32 |
italcorr cap_height#*slant+.25u#; |
| 33 |
adjust_fit(6u#+cap_serif_fit#,cap_serif_fit#); slantswitch; |
| 34 |
pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); |
| 35 |
lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; |
| 36 |
filldraw stroke z1e--z2e; % stem |
| 37 |
if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif |
| 38 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower stem serif |
| 39 |
% pickup fine.nib; pos3(vair,90); x3=x1; y3=.55h; z3'=z3; pos3'(slab,90); |
| 40 |
pickup fine.nib; pos3(vair,90); x3=x1; y3=.55h; z3'=z3; pos3'(varwid,90); |
| 41 |
% pos4(vair,90); x4=w-2u; top y4r=h+oo; |
| 42 |
pos4(varwid,90); x4=w-.75flare-.125u; top y4r=h+oo; |
| 43 |
% filldraw stroke z3'e{right}..{right}z4e; % upper diagonal |
| 44 |
x41=x4; y41=y3'; x42=x4-2u; y42=y4; |
| 45 |
filldraw stroke z3'e..controls z41 and z42..z4e; % upper diagonal |
| 46 |
pos5(hair,0); pos6(flare,0); |
| 47 |
rt x5r=hround(w-.125u); y5+.5flare=vround(top y4r-hair)+1; |
| 48 |
top y4'r=top y4r; x4'=x4; pos4'(hair,90); |
| 49 |
bulb(4',5,6); % bulb |
| 50 |
% pos7(stem,0); pos8(vair,90); pos9(hair,180); |
| 51 |
pos7(stem,0); pos8(varwid,90); pos9(hair,180); |
| 52 |
x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; |
| 53 |
lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; |
| 54 |
filldraw stroke z3e{right}...z7e{down} |
| 55 |
...z8e{right}...{up}z9e; % lower diagonal |
| 56 |
else: |
| 57 |
numeric right_jut,stem[],alpha[]; |
| 58 |
right_jut=.4tiny; |
| 59 |
pickup tiny.nib; |
| 60 |
stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); |
| 61 |
stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); |
| 62 |
top y3=h; rt x3r=hround(r-letter_fit-u-right_jut); |
| 63 |
bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut); |
| 64 |
x4=x1; y4=1/3h; |
| 65 |
alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); |
| 66 |
penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); |
| 67 |
alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); |
| 68 |
penpos6(alpha2*(stem2-tiny),0); |
| 69 |
forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4); |
| 70 |
z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor |
| 71 |
z5=.5[z5l,z5r]; |
| 72 |
z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); |
| 73 |
% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] |
| 74 |
z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); |
| 75 |
z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); |
| 76 |
fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal |
| 77 |
fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal |
| 78 |
fi |
| 79 |
picture V; %transform t; |
| 80 |
%t=identity reflectedabout(z1,z2); |
| 81 |
%V=currentpicture transformed t; |
| 82 |
%addto currentpicture also V; |
| 83 |
mirror(x1); |
| 84 |
addto currentpicture also K_pic; |
| 85 |
% !!!!! note that this requires K_pic be set as current by previous K definition |
| 86 |
% |
| 87 |
picture K_pic; %release resources held by K_pic |
| 88 |
endchar; |
| 89 |
|
| 90 |
cmchar "The Serbian letter Soft N (looks like Hb)"; |
| 91 |
beginchar(oct"000",19u#,cap_height#,0); |
| 92 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 93 |
adjust_fit(cap_serif_fit#,0); |
| 94 |
w:=13u; |
| 95 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 96 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 97 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 98 |
top y1=top y3=h; bot y2=bot y4=0; |
| 99 |
filldraw stroke z1e--z2e; % left stem |
| 100 |
filldraw stroke z3e--z4e; % right stem |
| 101 |
penpos5(cap_bar,90); penpos6(cap_bar,90); |
| 102 |
x5=x1; x6=x3; y5=y6=.52h; |
| 103 |
fill stroke z5e--z6e; % bar |
| 104 |
if serifs: numeric inner_jut; |
| 105 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 106 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 107 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 108 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 109 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper rt serif |
| 110 |
nodish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower rt serif |
| 111 |
% now the b part |
| 112 |
w:=19u; numeric middle_weight; |
| 113 |
middle_weight=if serifs: .6vair+.5 else: cap_bar fi; |
| 114 |
z88=z6; penpos88(middle_weight,90); penpos89(middle_weight,90); |
| 115 |
y89=y88; x89=x91= if serifs: .5[x3,w-1.5u]+.5u else: .5[x3,w-2.5u] +.5u fi; |
| 116 |
numeric right_curve; |
| 117 |
if serifs: right_curve=cap_curve-stem_corr; |
| 118 |
else: right_curve=cap_curve-3stem_corr; fi |
| 119 |
x89l:=x89-.25u; penpos90(right_curve,0); y90=.5[y89,y91]; x90r=hround(w-u); |
| 120 |
bot y92r=0; x92=x4; penpos92(cap_band,-90); y91=y92; penpos91(cap_band,-90); |
| 121 |
filldraw stroke z88e..super_arc.e(89,90)&super_arc.e(90,91)..z92e; |
| 122 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 123 |
|
| 124 |
cmchar "The Serbian letter Soft L"; |
| 125 |
beginchar(oct"001",19u#,cap_height#,0); |
| 126 |
adjust_fit(0,0); w:=13u; |
| 127 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 128 |
lft x1l=lft x2l=hround(w-3u); top y1=h; bot y2=0; |
| 129 |
filldraw stroke z1e--z2e; |
| 130 |
if serifs: |
| 131 |
numeric inner_jut; inner_jut=.5(x1-x5); |
| 132 |
x4=u+.5dot_size; x3=x4+.5dot_size; bot y3r=0; pos3(1.5cap_hair,-90); |
| 133 |
x5=.42[x4,x1]; top y5=h; pos5(1.5cap_hair,0); pos4(dot_size,-180); |
| 134 |
pos10(hair,-180); |
| 135 |
filldraw stroke z3e{right}...{up}z5e; |
| 136 |
y4=dot_size; bulb(3,10,4); |
| 137 |
nodish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); |
| 138 |
nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); |
| 139 |
% pickup crisp.nib; |
| 140 |
top y6=h; x6-.75cap_jut=rt x1r; pos6(slab,90); |
| 141 |
x5'+.5cap_jut=lft x5l; top y5'=h; pos5'(slab,90); |
| 142 |
% filldraw stroke z5'e--z6e; |
| 143 |
x9=x5; bot y9=0; pos9(cap_hair,0); |
| 144 |
nodish_serif(5,9,aa,1/3,cap_jut,ab,1/3,inner_jut); % upper left serif |
| 145 |
else: |
| 146 |
x5r=hround u; bot y5r=vround(.06h-o); bot y4r=-o; x4r=.35[x5,x3r]; |
| 147 |
x3=x5+3flare; top y3=h; lft x3'=lft x3l; top y3'r=h; rt x1'r=rt x1r; |
| 148 |
top y1'r=h; pos3'(slab,90); pos1'(slab,90); pos5(flare,-120); pos4(vair,-90); |
| 149 |
pos3(hair,0); |
| 150 |
filldraw stroke z5e...{right}z4e...{up}z3e; |
| 151 |
filldraw stroke z3'e--z1'e; |
| 152 |
fi |
| 153 |
% now the b part |
| 154 |
w:=19u; numeric middle_weight; middle_weight=.6vair+.5; |
| 155 |
x88=x1; y88=.52h; penpos88(middle_weight,90); penpos89(middle_weight,90); |
| 156 |
y89=y88; x89=x91= if serifs: .5[x1,w-1.5u]+.5u else: .5[x1,w-2.5u] +.5u fi; |
| 157 |
numeric right_curve; |
| 158 |
if serifs: right_curve=cap_curve-stem_corr; else: right_curve=cap_curve-3stem_corr; fi |
| 159 |
x89l:=x89-.25u; penpos90(right_curve,0); y90=.5[y89,y91]; x90r=hround(w-u); |
| 160 |
x92=x2; bot y92r=0; penpos92(cap_band,-90); y91=y92; penpos91(cap_band,-90); |
| 161 |
filldraw stroke z88e..super_arc.e(89,90)&super_arc.e(90,91)..z92e; |
| 162 |
endchar; |
| 163 |
|
| 164 |
cmchar "The Serbian letter Hard DJ"; |
| 165 |
beginchar(oct"002",13u#+width_adj#,cap_height#,if serifs: 1.75cap_stem# |
| 166 |
else: .5desc_depth# fi); |
| 167 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 168 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 169 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 170 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 171 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 172 |
top y1=top y3=h; bot y2=bot y4=0; |
| 173 |
filldraw stroke z1e--z2e; % left stem |
| 174 |
filldraw stroke z3e--z4e; % right stem |
| 175 |
if serifs: numeric inner_jut; |
| 176 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 177 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 178 |
dish_serif(1,2,c,1/3,cap_jut,d,1/3,inner_jut); % upper left serif |
| 179 |
dish_serif(3,4,g,1/3,inner_jut,h,1/3,cap_jut); % upper left serif |
| 180 |
inner_jut:=.5(x3l-x1r); |
| 181 |
nodish_serif(2,1,a,1/3,cap_jut,b,1/3,inner_jut); % lower left serif |
| 182 |
nodish_serif(4,3,e,1/3,inner_jut,f,1/3,cap_jut); % lower left serif |
| 183 |
else: |
| 184 |
lft x1'= lft x1l; bot y1'l=0; pos1'(slab,90); |
| 185 |
rt x3'=rt x3r; y3'=y1'; pos3'(slab,90); filldraw stroke z1'e--z3'e; |
| 186 |
fi |
| 187 |
x90=.5[x2,x4]; y90=0; x91=x90; y91=-d; pos90(cap_stem,0); pos91(cap_stem,0); |
| 188 |
filldraw stroke z90e--z91e; |
| 189 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 190 |
|
| 191 |
cmchar "The Russian letter Reverse E (looks like backwards C)"; |
| 192 |
if serifs: beginchar(oct"003",13u#,cap_height#,0); |
| 193 |
italcorr cap_height#*slant-.5u#; |
| 194 |
adjust_fit(0,0); slantswitch; |
| 195 |
pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); |
| 196 |
pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); |
| 197 |
rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; |
| 198 |
top y2r=h+o; bot y4r=-o; y3=.5[y2,y4]; |
| 199 |
bot y1=min(vround .675h,bot y2l-eps); |
| 200 |
y5=max(good.y .95(h-y1),y4l+eps); |
| 201 |
(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); |
| 202 |
(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); |
| 203 |
filldraw stroke z1e{x2-x1,10(y2-y1)} |
| 204 |
...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc |
| 205 |
pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; |
| 206 |
x1r-x1'=2cap_curve-fine; y1'=y1; |
| 207 |
path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; |
| 208 |
numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); |
| 209 |
filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb |
| 210 |
else: beginchar(oct"003",11.5u#,cap_height#,0); |
| 211 |
italcorr cap_height#*slant-.5u#; |
| 212 |
adjust_fit(0,0); slantswitch; |
| 213 |
pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); |
| 214 |
pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); |
| 215 |
rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; |
| 216 |
lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); |
| 217 |
top y1r=vround .95h+o; top y2r=h+o; y3=.5h; |
| 218 |
bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; |
| 219 |
x1'=.65w; |
| 220 |
filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) |
| 221 |
& super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals |
| 222 |
z90=z3l; x91=x1; y91=y90; pos90(bar,90); pos91(bar,90); |
| 223 |
if serifs: z92=.625[z90,z91]; pos92(if serifs: 2.5 fi bar,90); |
| 224 |
filldraw stroke z90e{1,1}..{1,-1}z92e..{1,1}z91e; |
| 225 |
else: filldraw stroke z90e--z91e; fi |
| 226 |
mirror(.5w); |
| 227 |
math_fit(-.3cap_height#*slant-.5u#,.5ic#); |
| 228 |
penlabels(1,1',2,3,4,5,6); endchar; |
| 229 |
|
| 230 |
cmchar "The Ukrainian letter YE (looks like C with mid-line)"; |
| 231 |
if serifs: beginchar(oct"005",13u#,cap_height#,0); |
| 232 |
italcorr cap_height#*slant-.5u#; |
| 233 |
adjust_fit(0,0); |
| 234 |
pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); |
| 235 |
pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); |
| 236 |
rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; |
| 237 |
top y2r=h+o; bot y4r=-o; y3=.5[y2,y4]; |
| 238 |
bot y1=min(vround .675h,bot y2l-eps); |
| 239 |
y5=max(good.y .95(h-y1),y4l+eps); |
| 240 |
(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); |
| 241 |
(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); |
| 242 |
filldraw stroke z1e{x2-x1,10(y2-y1)} |
| 243 |
...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc |
| 244 |
pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; |
| 245 |
x1r-x1'=2cap_curve-fine; y1'=y1; |
| 246 |
path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; |
| 247 |
numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); |
| 248 |
filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb |
| 249 |
else: beginchar(oct"005",11.5u#,cap_height#,0); |
| 250 |
italcorr cap_height#*slant-.5u#; |
| 251 |
adjust_fit(0,0); |
| 252 |
pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); |
| 253 |
pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); |
| 254 |
rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; |
| 255 |
lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); |
| 256 |
top y1r=vround .95h+o; top y2r=h+o; y3=.5h; |
| 257 |
bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; |
| 258 |
x1'=.65w; |
| 259 |
filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) |
| 260 |
& super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals |
| 261 |
z90=z3l; x91=x1; y91=y90; pos90(bar,90); pos91(bar,90); |
| 262 |
if serifs: z92=.625[z90,z91]; pos92(if serifs: 2.5 fi bar,90); |
| 263 |
filldraw stroke z90e{1,1}..{1,-1}z92e..{1,1}z91e; |
| 264 |
else: filldraw stroke z90e--z91e; fi |
| 265 |
math_fit(-.3cap_height#*slant-.5u#,.5ic#); |
| 266 |
penlabels(1,1',2,3,4,5,6); endchar; |
| 267 |
|
| 268 |
cmchar "The Russian letter YU (looks like IO)"; |
| 269 |
beginchar(oct"020",14u#-width_adj#,cap_height#,0); |
| 270 |
italcorr .7cap_height#*slant-.5u#; |
| 271 |
adjust_fit(6.5u#,0); |
| 272 |
penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); |
| 273 |
penpos2(cap_curve,180); penpos4(cap_curve,0); |
| 274 |
if monospace: x2r=hround 1.5u; |
| 275 |
interim superness:=sqrt superness; % make |"O"|, not |"0"| |
| 276 |
else: x2r=hround u; fi |
| 277 |
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; |
| 278 |
y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; |
| 279 |
penstroke pulled_super_arc.e(1,2)(.5superpull) |
| 280 |
& pulled_super_arc.e(2,3)(.5superpull) |
| 281 |
& pulled_super_arc.e(3,4)(.5superpull) |
| 282 |
& pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl |
| 283 |
pickup tiny.nib; |
| 284 |
x80=x81=-3u; top y80=h; bot y81=0; pos80(cap_stem,0); pos81(cap_stem,0); |
| 285 |
filldraw stroke z80e--z81e; |
| 286 |
if serifs: |
| 287 |
dish_serif(80,81,e,1/3,cap_jut,f,1/3,cap_jut); |
| 288 |
dish_serif(81,80,g,1/3,cap_jut,h,1/3,cap_jut); |
| 289 |
fi |
| 290 |
x82=x80; y82=y2; x83=x2; y83=y82; pos82(cap_bar,90); pos83(cap_bar,90); |
| 291 |
filldraw stroke z82e--z83e; |
| 292 |
math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#); penlabels(1,2,3,4); endchar; |
| 293 |
|
| 294 |
cmchar "The Russian letter Short I"; |
| 295 |
beginchar(oct"022",14u#+width_adj#,cap_height#+3dot_size#,0); |
| 296 |
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 297 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); h:=cap_height; |
| 298 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 299 |
pos3(cap_stem,0); pos4(cap_stem,0); |
| 300 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; |
| 301 |
top y1=top y3=h; bot y2=bot y4=0; |
| 302 |
filldraw stroke z1e--z2e; % left stem |
| 303 |
filldraw stroke z3e--z4e; % right stem |
| 304 |
if serifs: penpos5(.85cap_stem,90); penpos6(.85cap_stem,90); else: penpos5(cap_stem,90); penpos6(cap_stem,90); fi |
| 305 |
x5=x1r; x6=x3l; if serifs: y5=.1h; y6=.9h; else: bot y5l=0; top y6r=h; fi |
| 306 |
fill stroke z5e--z6e; % bar |
| 307 |
if serifs: numeric inner_jut; |
| 308 |
if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; |
| 309 |
else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi |
| 310 |
dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif |
| 311 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif |
| 312 |
dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif |
| 313 |
dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower left serif |
| 314 |
x51=.5w; y51=h; h:=body_height+2dot_size; nucyrbrev(51,q); |
| 315 |
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; |
| 316 |
|
| 317 |
% for shape, see Knizhnay Shrift p 58 Bodoni, Parma 1818 |
| 318 |
cmchar "The Old Russian letter IZHITSA (looks like V)"; |
| 319 |
beginchar(oct"024",13u#,cap_height#,0); |
| 320 |
italcorr cap_height#*slant+.25u#; |
| 321 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 322 |
numeric left_stem,right_stem,outer_jut,alpha; |
| 323 |
left_stem=cap_stem-stem_corr; |
| 324 |
right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); |
| 325 |
outer_jut=.75cap_jut; |
| 326 |
x1l=w-x4r-1.5u=l+letter_fit+outer_jut+.25u; y1=y4+.1h+cap_hair=h; |
| 327 |
x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; |
| 328 |
alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); |
| 329 |
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); |
| 330 |
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); |
| 331 |
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; |
| 332 |
x5=x4+ if serifs:1.5 else: 2.25 fi u; top y5r=h+oo; penpos5(cap_hair,90); |
| 333 |
rt x6r-.25flare=hround(w-.5u-.5); y6+.55flare=bot y5l; penpos6(hair,0); |
| 334 |
penpos7(flare,0); if serifs: bulb(5,6,7); fi |
| 335 |
if y0>cap_notch_cut: y0:=cap_notch_cut; message "y0>cap_notch_cut"; |
| 336 |
fill z0+.5right{up}...{z4-z3}z4l...{right}z5r--z5l{left} |
| 337 |
...z4r{z3-z4}--z3r...z3l--diag_end(2l,1l,1,1,1r,2r){z2-z1} |
| 338 |
...{down}z0+.5left--cycle; % left and right diagonals |
| 339 |
else: fill z0--z4l{z4-z3}...{right}z5r--z5l{left} |
| 340 |
...{z3-z4}z4r--z3r{-10,-1}...{-10,1}z3l |
| 341 |
--diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals |
| 342 |
if serifs: numeric inner_jut; pickup tiny.nib; |
| 343 |
prime_points_inside(1,2); prime_points_inside(4,3); |
| 344 |
if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; |
| 345 |
else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi |
| 346 |
dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % left serif |
| 347 |
fi |
| 348 |
math_fit(.75u#-cap_height#*slant,ic#-4u#); penlabels(0,1,2,3,4); endchar; |
| 349 |
|
| 350 |
cmchar "The Old Russian letter FITA (looks like Theta)"; |
| 351 |
beginchar(oct"025",14u#,cap_height#,0); |
| 352 |
italcorr .7cap_height#*slant-.5u#; |
| 353 |
adjust_fit(0,0); |
| 354 |
numeric light_curve; light_curve=hround(cap_curve-2stem_corr); |
| 355 |
penpos1(vair,90); penpos3(vround(vair+.5vair_corr),-90); |
| 356 |
penpos2(light_curve,180); penpos4(light_curve,0); |
| 357 |
if monospace: x2r=hround 4.5u; |
| 358 |
interim superness:=sqrt superness; % make |"O"|, not |"0"| |
| 359 |
else: x2r=hround 2.5u; fi |
| 360 |
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o; |
| 361 |
penstroke pulled_super_arc.e(1,2)(.5superpull) |
| 362 |
& pulled_super_arc.e(2,3)(.5superpull) |
| 363 |
& pulled_super_arc.e(3,4)(.5superpull) |
| 364 |
& pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl |
| 365 |
pickup crisp.nib; pos5(cap_vstem,90); pos6(cap_vstem,90); |
| 366 |
lft x5=w-rt x6=hround .5u; y5=y6=.5[y1l,y3l]; |
| 367 |
filldraw stroke z5e--z6e; % bar |
| 368 |
if serifs: pos7(hair,0); pos8(hair,0); pos9(hair,0); pos10(hair,0); |
| 369 |
x7l=x8l=x5; x9r=x10r=x6; |
| 370 |
y7=y5r; y9=y6r; y5l-y8=y6l-y10=vround .075h; |
| 371 |
filldraw stroke z7e--z8e; % left serif |
| 372 |
filldraw stroke z9e--z10e; fi % right serif |
| 373 |
math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#); |
| 374 |
penlabels(1,2,3,4,5,6,7,8,9,10); endchar; |
| 375 |
|
| 376 |
cmchar "The Macedonian letter ZELO (looks like S)"; |
| 377 |
beginchar(oct"026",10u#,cap_height#,0); |
| 378 |
italcorr cap_height#*slant-u#; |
| 379 |
adjust_fit(0,0); |
| 380 |
numeric theta; theta=90-angle(50u,h); slope:=-h/50u; % angle at middle |
| 381 |
numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; |
| 382 |
numeric ess'; ess'=max(fine.breadth,cap_ess); |
| 383 |
pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90); |
| 384 |
pos0(ess',theta); pos7(s_slab,-90); |
| 385 |
x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o; |
| 386 |
y0=.52h; lft x3l=hround u; rt x6r=hround(w-u); |
| 387 |
x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; |
| 388 |
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; |
| 389 |
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; |
| 390 |
filldraw stroke super_arc.e(2,3) & z3e{down} |
| 391 |
..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke |
| 392 |
if serifs: pos1(hair,180); pos8(hair,180); |
| 393 |
rt x1l=hround(w-1.5u); lft x8r=hround u; |
| 394 |
bot y1=vround 2/3h+1; top y8=vround 1/3h-1; |
| 395 |
filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e; % upper arc |
| 396 |
filldraw stroke z7e{left}....{up}z8e; % lower arc |
| 397 |
path upper_arc, lower_arc; |
| 398 |
upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2; |
| 399 |
lower_arc=z7{left}....{up}z8; |
| 400 |
pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0); |
| 401 |
x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; |
| 402 |
x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8; |
| 403 |
numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); |
| 404 |
filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb |
| 405 |
t:=xpart(lower_arc intersectiontimes(z9r--z8')); |
| 406 |
filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb |
| 407 |
else: pos1(1.2flare,-100); pos8(1.2flare,-100); |
| 408 |
x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u; |
| 409 |
top y1l=vround .93h+o; bot y8r=vround .1h-o; |
| 410 |
filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal |
| 411 |
filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal |
| 412 |
math_fit(0,.5ic#); penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; |
| 413 |
|
| 414 |
cmchar "The Russian letter YA (looks like backward R)"; |
| 415 |
beginchar(oct"027",if serifs: 12u#+.5max(2u#,cap_curve#) |
| 416 |
else:12.5u#-.5width_adj# fi,cap_height#,0); |
| 417 |
italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#; |
| 418 |
adjust_fit(0,cap_serif_fit#); slantswitch; |
| 419 |
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); |
| 420 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; |
| 421 |
filldraw stroke z1e--z2e; % stem |
| 422 |
penpos3(cap_band,90); penpos4(cap_band,90); |
| 423 |
penpos5(cap_curve if hefty:-3stem_corr fi,0); |
| 424 |
penpos6(vair,-90); penpos7(vair,-90); |
| 425 |
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; |
| 426 |
x7=x2; y7l=vround(.5h+.5vair); x4=x6; |
| 427 |
if serifs: x4=.5w-.5u; x5r=hround(w-2.25u); |
| 428 |
else: x4=.5w+.5u; x5r=hround(w-u); fi |
| 429 |
x4l:=x6l:=x4-.125cap_curve; |
| 430 |
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe |
| 431 |
if serifs: pos6'(vair,-90); pos0(cap_stem,180); |
| 432 |
pos8(cap_curve,180); pos9(vair,-90); pos10(hair,0); |
| 433 |
z6'=z6; lft x0r=lft x8r=hround(x5-2/3u-.5cap_curve); |
| 434 |
y8=1/3[y2,y7]; y0=3/5[y2,y7]; x9=.5[x8l,x10r]; |
| 435 |
bot y9r=-o; rt x10r=hround(w-.05u); y10=1/4[y2,y7]; |
| 436 |
filldraw stroke z6'e{right}..z0e---z8e....z9e{right}..z10e{up}; % tail |
| 437 |
nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif |
| 438 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower serif |
| 439 |
else: penpos8(cap_stem-2stem_corr,0); penpos9(cap_stem,0); |
| 440 |
x8=x6+.5u; y8=y6; x9r=hround(w-.5u); y9=0; |
| 441 |
fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi % tail |
| 442 |
mirror(.5w); |
| 443 |
math_fit(0,.75ic#); penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; |
| 444 |
|
| 445 |
endinput; %%%%%%%%%%%%%%%%%%%% |
| 446 |
|
| 447 |
cmchar "The Ukrainian letter Hard G (looks like Gamma)"; |
| 448 |
beginchar(oct"225",11.5u#-width_adj#,body_height#,0); |
| 449 |
italcorr cap_height#*slant-beak_jut#-.25u#; |
| 450 |
adjust_fit(cap_serif_fit#,0); |
| 451 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 452 |
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=cap_height; bot y2=0; |
| 453 |
filldraw stroke z1e--z2e; % stem |
| 454 |
pickup crisp.nib; pos3(slab,90); pos4(hair,0); |
| 455 |
top y3r=cap_height; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l+beak)+eps; |
| 456 |
if serifs: armup(3,4,e,beak_darkness,beak_jut); % upper arm and beak |
| 457 |
else: x21=x4; y21=y3; rt x22r=rt x21; x22'=x22; y22'=top y21r; y22=top y21r+slab; pos21(slab,90); pos22(slab,0); pos22'(slab,0); |
| 458 |
filldraw stroke z3e--z21e; filldraw stroke z22e--z22'e; |
| 459 |
fi |
| 460 |
pos5(cap_bar,-90); pos6(hair,0); |
| 461 |
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; |
| 462 |
pos0(cap_bar,90); pos7(hair,0); |
| 463 |
z0=z5; x6=x7; y6-y5l=y0l-y7; |
| 464 |
if serifs: rt x6r=hround(w-4u+.5hair); y6=good.y(y5l+.6beak)+eps; |
| 465 |
rt x9r=hround(w-.5u); |
| 466 |
else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi |
| 467 |
%arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif |
| 468 |
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif |
| 469 |
dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif |
| 470 |
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar; |
| 471 |
|
| 472 |
cmchar "The letter A modified"; |
| 473 |
beginchar(oct"255",13u#+2cap_stem#,cap_height#,0); |
| 474 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 475 |
numeric left_stem,right_stem,outer_jut,alpha; |
| 476 |
right_stem=cap_stem-stem_corr; |
| 477 |
left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); |
| 478 |
outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0; |
| 479 |
x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; |
| 480 |
alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); |
| 481 |
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); |
| 482 |
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); |
| 483 |
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; |
| 484 |
if y0<h-cap_notch_cut: y0:=h-cap_notch_cut; |
| 485 |
fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) |
| 486 |
--diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} |
| 487 |
...{up}z0+.5left--cycle; % left and right diagonals |
| 488 |
else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) |
| 489 |
--diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals |
| 490 |
penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2]; |
| 491 |
penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5; |
| 492 |
if hefty: y5r else: y5 fi =.5y0; |
| 493 |
y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line |
| 494 |
if serifs: numeric inner_jut; pickup tiny.nib; |
| 495 |
prime_points_inside(1,2); prime_points_inside(4,3); |
| 496 |
if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; |
| 497 |
else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi |
| 498 |
dish_serif(1',2,a,1/2,outer_jut,b,.6,.6inner_jut)(dark); % left serif |
| 499 |
dish_serif(4',3,c,1/2,.6inner_jut,d,1/3,outer_jut); fi % right serif |
| 500 |
x99=.5[x5,x6]; y99=y5; pos99(.5cap_stem,0); pos98(.5cap_stem,0); |
| 501 |
x98=x99; bot y98=0; filldraw stroke z98e--z99e; |
| 502 |
if serifs: dish_serif(98,99,e,1/3,.6inner_jut,f,1/3,.6inner_jut); fi |
| 503 |
penlabels(0,1,2,3,4,5,6); endchar; |
| 504 |
|
| 505 |
cmchar "The Old Bulgarian letter YUS"; |
| 506 |
beginchar(oct"322",18u#,cap_height#,0); |
| 507 |
italcorr cap_height#*slant+.25u#; |
| 508 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 509 |
pickup tiny.nib; |
| 510 |
x1l=w-x2r=.2w; |
| 511 |
pos1(cap_stem,0); pos2(cap_hair,0); top y1=h; y2=y1; |
| 512 |
x3=.5[x1,x2]; x4=x3; bot y4=0; pos3(cap_stem,0); pos4(cap_stem,0); |
| 513 |
pos5(cap_stem,0); x5=x3; |
| 514 |
bot y5=.52h; %top y5=x_height; |
| 515 |
z3l=whatever[z1l,z5l]; z3r=whatever[z5r,z2r]; |
| 516 |
x5'r=x5r; y5'=y5; pos5'(cap_hair,0); |
| 517 |
filldraw stroke z1e--z5e; |
| 518 |
filldraw stroke z5'e--z2e; filldraw stroke z3e--z4e; |
| 519 |
if serifs: pos0(cap_stem,180); pos8(cap_curve,180); pos9(vair,-90); pos10(hair,0); |
| 520 |
x7=x3; y7r=bot y5; x6=1/3[x4,x8]; y6=y7; pos6(vair,-90); pos7(vair,-90); |
| 521 |
x11=w-x6; pos11(vair,-90); y11=y6; |
| 522 |
pos12(cap_stem,0); pos13(cap_curve,0); pos14(vair,-90); pos15(hair,180); |
| 523 |
lft x0r=lft x8r=hround(w-3.5u-.5cap_curve); x12r=x13r=w-x8r; |
| 524 |
y8=y13=1/3[y4,y7]; y0=y12=3/6[y4,y7]; x9=.5[x8l,x10r]; x14=w-x9; |
| 525 |
bot y9r=-o; y14=y9; rt x10r=hround(w-.05u); x15=w-x10; y10=y15=1/4[y4,y7]; |
| 526 |
filldraw stroke |
| 527 |
z15e{down}..{right}z14e....z13e---z12e..{right}z11e--z6e{right}..z0e---z8e |
| 528 |
....z9e{right}..{up}z10e; |
| 529 |
dish_serif(4,3,c,1/3,.75cap_jut,d,1/3,.75cap_jut); |
| 530 |
else: |
| 531 |
penpos9(cap_stem,0); penpos14(cap_stem,180); x9r=hround(w-.5u); x14=w-x9; |
| 532 |
y9=y14=0; penpos10(cap_stem,0); penpos15(cap_stem,180); penpos13(cap_stem,90); |
| 533 |
top y13r=.52h; x13=x4; x10=x13+.2w; y10=y15=.8y13; x15=w-x10; |
| 534 |
fill z13l{right}...{z9l-z10l}z10l--diag_end(10l,9l,.5,1,9r,10r)--z10r{z10r-z9r}...{left}z13r--cycle; |
| 535 |
fill z13l{left}...{z14l-z15l}z15l--diag_end(15l,14l,.5,1,14r,15r)--z15r{z15r-z14r}...{right}z13r--cycle; |
| 536 |
fi |
| 537 |
x20=x1r; x21=x2l; top y20r=top y21r=h; pos20(slab,90); pos21(slab,90); |
| 538 |
filldraw stroke z20e--z21e; |
| 539 |
endchar; |