| 1 |
%% filename: cyrspl.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 |
% Cyrspl special lowercase cyrillic forms, incl. o |
| 26 |
|
| 27 |
cmchar "The Ukrainian letter i"; |
| 28 |
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#); |
| 29 |
beginchar(oct"014",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0); |
| 30 |
define_whole_blacker_pixels(dot_diam); |
| 31 |
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#; |
| 32 |
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); |
| 33 |
pickup tiny.nib; pos1(stem',0); pos2(stem',0); |
| 34 |
if odd(w-stem'): change_width; fi |
| 35 |
lft x1l=hround(.5w-.5stem'); x1=x2; |
| 36 |
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; |
| 37 |
filldraw stroke z1e--z2e; % stem |
| 38 |
pos3(dot_diam,0); pos4(dot_diam,90); |
| 39 |
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi; |
| 40 |
top y4r=h+1; |
| 41 |
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi |
| 42 |
x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot |
| 43 |
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif |
| 44 |
dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif |
| 45 |
penlabels(1,2,3,4); endchar; |
| 46 |
|
| 47 |
cmchar "The letter dj (looks like barred h with tail)"; |
| 48 |
beginchar(oct"016",9.5u#,asc_height#,desc_depth#); |
| 49 |
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#; |
| 50 |
adjust_fit(u#+serif_fit#+stem_shift#,serif_fit#-stem_shift#); |
| 51 |
pickup tiny.nib; pos1(stem,0); pos2(stem,0); |
| 52 |
pos1'(stem',0); pos2'(stem',0); |
| 53 |
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; |
| 54 |
top y1=h; bot y2=0; y1=y1'; y2=y2'; |
| 55 |
filldraw stroke z1'e--z2'e; % left stem |
| 56 |
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif |
| 57 |
dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif |
| 58 |
fi |
| 59 |
pickup crisp.nib; |
| 60 |
x98=0; x99=hround(w-u); y98=y99=.5x_height+.5h; pos98(bar,90); pos99(bar,90); |
| 61 |
filldraw stroke z98e--z99e; |
| 62 |
pickup tiny.nib; |
| 63 |
%w:=12u; |
| 64 |
x23=hround(w-u); y23=bar_height; %2/3[x_height,bar_height]; |
| 65 |
if serifs: pos23(.9stem,0) else: pos23(stem,0) fi; |
| 66 |
rt x20l=rt x2r; y20=7/8[x_height,bar_height]; pos20(hair,180); |
| 67 |
x21=.45[x20,x23]; top y21r=x_height+oo; pos21(hair,90); |
| 68 |
pos24(cap_hair,-90); |
| 69 |
%if serifs: x24=.45[x20,x23] else: x24=.55[x20,x23] fi; |
| 70 |
lft x24r=rt x2r; %even with right edge of stem; |
| 71 |
bot y24r=-d; |
| 72 |
%filldraw stroke z20e...{right}z21e{right}...z23e{down}...{-6,-3}z24e; |
| 73 |
filldraw stroke z20e...{right}z21e & pulled_arc.e(21,23) & pulled_arc.e(23,24); |
| 74 |
penlabels(1,2,3,4,20,21,23,24); endchar; |
| 75 |
|
| 76 |
cmchar "The Serbian letter soft t (looks like barred h)"; |
| 77 |
beginchar(oct"017",11u#,asc_height#,0); |
| 78 |
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#; |
| 79 |
adjust_fit(.5u#+serif_fit#+stem_shift#,serif_fit#-stem_shift#); |
| 80 |
pickup tiny.nib; pos1(stem,0); pos2(stem,0); |
| 81 |
pos1'(stem',0); pos2'(stem',0); pos3(stem,0); |
| 82 |
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1; |
| 83 |
top y1=h; bot y2=0; y1=y1'; y2=y2'; |
| 84 |
filldraw stroke z1'e--z2'e; % left stem |
| 85 |
h_stroke(2,a,3,4); % arch and right stem |
| 86 |
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif |
| 87 |
numeric inner_jut; pickup tiny.nib; |
| 88 |
if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut; |
| 89 |
else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi |
| 90 |
dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif |
| 91 |
dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif |
| 92 |
pickup crisp.nib; |
| 93 |
x98=0; x99=x4; y98=y99=.5x_height+.5h; pos98(bar,90); pos99(bar,90); |
| 94 |
filldraw stroke z98e--z99e; |
| 95 |
penlabels(1,2,3,4); endchar; |
| 96 |
|
| 97 |
cmchar "The Russian letter yo (looks like e umlaut)"; |
| 98 |
beginchar(oct"033",7.25u#+max(.75u#,.5curve#),x_height#,0); |
| 99 |
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); |
| 100 |
adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi); |
| 101 |
numeric left_curve,right_curve; |
| 102 |
left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; |
| 103 |
if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi |
| 104 |
if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi |
| 105 |
pickup tiny.nib; pos1(right_curve,0); |
| 106 |
pos2(vair,90); pos3(left_curve,180); |
| 107 |
y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; |
| 108 |
rt x1r=hround min(w-.5u,w-u+.5right_curve); |
| 109 |
lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; |
| 110 |
{{interim superness:=more_super; |
| 111 |
filldraw stroke super_arc.e(1,2)}}; % right bowl |
| 112 |
y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; |
| 113 |
if serifs: pos4(vair',270); pos5(hair,360); |
| 114 |
y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; |
| 115 |
(x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); |
| 116 |
filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) |
| 117 |
...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal |
| 118 |
else: pos4(vair,270); |
| 119 |
filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc |
| 120 |
pickup fine.nib; pos4'(vair,270); z4=z4'; |
| 121 |
pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); |
| 122 |
y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; |
| 123 |
filldraw stroke term.e(4',5,right,1,4); fi % terminal |
| 124 |
path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); |
| 125 |
y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; |
| 126 |
forsuffixes $=l,r: |
| 127 |
x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor |
| 128 |
fill stroke z0e--z1'e; % crossbar |
| 129 |
umlaut(2,q); |
| 130 |
penlabels(0,1,2,3,4,5); endchar; |
| 131 |
|
| 132 |
cmchar "The Old Russian letter yatz"; |
| 133 |
beginchar(oct"053",11u#,body_height#,0); |
| 134 |
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#); |
| 135 |
adjust_fit(u#+serif_fit#,0); |
| 136 |
pickup tiny.nib; pos1(stem,0); pos2(stem,0); |
| 137 |
lft x1l=lft x2l=hround(max(2u,3u-.5stem)); top y1=h-1.5jut; bot y2=0; |
| 138 |
filldraw stroke z1e--z2e; % body of stem |
| 139 |
penpos8(.5[vair,bar],90); penpos9(.5[vair,bar],90); |
| 140 |
penpos10(curve,0); penpos11(slab,-90); penpos12(slab,-90); |
| 141 |
y9=y8=.5[bar_height,x_height]; x9=x11=.5[x1,w-1.5u]; |
| 142 |
y12r= y11r=0; y10=.5[y11,y9]; |
| 143 |
x9l:=x9l-.5u; x11l:=x11l-.5u; x8=x12=x1; x10r=hround(w-u); |
| 144 |
fill stroke z8e..super_arc.e(9,10)& super_arc.e(10,11)..z12e; %bowl |
| 145 |
if serifs: nodish_serif(2,1,a,1/3,jut,b,1/3,.5jut) ; fi |
| 146 |
% |
| 147 |
pickup tiny.nib; |
| 148 |
x71=x1l-2.5u; x72=x1r+2.5u; y71r=y72r=y1- if serifs: 1.5u else: 2u fi; |
| 149 |
pos71(slab,90); pos72(slab,90); filldraw stroke z71e--z72e; % cross |
| 150 |
lft x991l=lft x1l;rt x991r=rt x1r; y991r=y991l=y1; |
| 151 |
x92=x1l-jut; x93=x1r+jut; y92=y93=y1+2jut; |
| 152 |
if hefty: filldraw z1l--z92--z1r--cycle; filldraw z1l--z93--z1r--cycle; else: |
| 153 |
filldraw z991l--z92--z991r--cycle; filldraw z991l--z93--z991r--cycle; fi |
| 154 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 155 |
|
| 156 |
cmchar "The letter dotless i"; |
| 157 |
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#); |
| 158 |
beginchar("=",5u#,x_height#,0); |
| 159 |
define_whole_blacker_pixels(dot_diam); |
| 160 |
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#; |
| 161 |
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); |
| 162 |
pickup tiny.nib; pos1(stem',0); pos2(stem',0); |
| 163 |
if odd(w-stem'): change_width; fi |
| 164 |
lft x1l=hround(.5w-.5stem'); x1=x2; |
| 165 |
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; |
| 166 |
filldraw stroke z1e--z2e; % stem |
| 167 |
pos3(dot_diam,0); pos4(dot_diam,90); |
| 168 |
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi; |
| 169 |
top y4r=h+1; |
| 170 |
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi |
| 171 |
x3=x4; y3=.5[y4l,y4r]; %dot(3,4); % dot |
| 172 |
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif |
| 173 |
dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif |
| 174 |
penlabels(1,2,3,4); endchar; |
| 175 |
|
| 176 |
cmchar "The Russian letter a"; |
| 177 |
beginchar("a",9u#,x_height#,0); |
| 178 |
bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh); |
| 179 |
italcorr 1/3[bh#,x_height#]*slant+.5stem#-serif_fit#-2u#; |
| 180 |
adjust_fit(0,serif_fit# if serifs: if hair#+.5stem#>1.5u#:-.25u# fi\\fi); |
| 181 |
pickup fine.nib; top y3r=h+vround 1.5oo; |
| 182 |
if serifs: pos1(flare,180); pos2(hair,180); |
| 183 |
pos3(vair,90); lft x1r=hround max(u,2.1u-.5flare); x3=.5w-.5u; |
| 184 |
y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare); |
| 185 |
bulb(3,2,1); % bulb |
| 186 |
else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r; |
| 187 |
pos3(1/8[vair,thin_join],90); |
| 188 |
x3=.5w-.2u; top y1r=vround .82[bh,top y3r]; |
| 189 |
filldraw stroke term.e(3,1,left,.9,4); fi % terminal |
| 190 |
pos4(stem,0); rt x4r=hround(w-2.5u+.5stem); y4=1/3[bh,h]; |
| 191 |
pos5(stem,0); x5=x4; y5=max(.55bh,2vair); |
| 192 |
filldraw stroke super_arc.e(3,4)&z4e..z5e; % arc and stem |
| 193 |
pos6(.3[thin_join,vair],90); x6=x4; bot y6=bh; |
| 194 |
pos7(hround(curve-2stem_corr),180); |
| 195 |
lft x7r=hround max(.5u,1.5u-.5curve); y7=1/3[top y8l,top y6r]; |
| 196 |
pos8(vair,270); x8l=.5w-.75u; bot y8r=-oo; |
| 197 |
pos9(thin_join,360); z9l=z5l; |
| 198 |
(x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u); |
| 199 |
{{interim superness:=more_super; |
| 200 |
filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl |
| 201 |
if serifs: numeric shaved_stem; shaved_stem=hround(stem-3stem_corr); |
| 202 |
if hair#+.5stem#>1.5u#: pickup tiny.nib; |
| 203 |
pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5; |
| 204 |
pos10(shaved_stem,0); x10=x5'; y10=.2[.5tiny,bh]; |
| 205 |
pos11(shaved_stem,0); rt x11r=hround(w-.25u); bot y11=0; |
| 206 |
pos12(shaved_stem,0); x11=x12; top y12=slab+eps; |
| 207 |
filldraw z5'l---z10l...z11l{right}--z11r |
| 208 |
--z12r{left}...z10r+.75(z12-z11)---z5'r--cycle; % foot |
| 209 |
else: pickup crisp.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5; |
| 210 |
pos10(shaved_stem,0); x10=x5'; y10=1/3bh; |
| 211 |
pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo; |
| 212 |
pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair); |
| 213 |
pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12); |
| 214 |
(x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10); |
| 215 |
filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; fi % hook |
| 216 |
else: numeric shaved_stem; shaved_stem=hround(stem-stem_corr); |
| 217 |
pickup tiny.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5; |
| 218 |
pos10(shaved_stem,0); x10=x5'; bot y10=0; |
| 219 |
filldraw stroke z5'e--z10e; fi % base of stem |
| 220 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; |
| 221 |
|
| 222 |
cmchar "The Russian letter be"; |
| 223 |
beginchar("b",9u#,asc_height#,0); |
| 224 |
italcorr .7asc_height#*slant; |
| 225 |
adjust_fit(if monospace: .5u#,.5u# else: .5u#,0 fi); |
| 226 |
penpos1(vair,90); penpos3(vair',-90); |
| 227 |
penpos2(curve,180); penpos4(curve,0); |
| 228 |
x2r=hround max(.5u,1.25u-.5curve); |
| 229 |
x4r=w-x2r; x1=x3=.5w; y1r=x_height+vround 1.5oo; y3r=-oo; |
| 230 |
y2=y4=.5x_height-vair_corr; y2l:=y4l:=.52x_height; |
| 231 |
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) |
| 232 |
& pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl |
| 233 |
x2'r=x2r; pos2'(vair,180); y2'=y2; |
| 234 |
x20r=x2r+1.525u; y20=.55[y1,y22]; pos20(stem,135); |
| 235 |
x21=x22-1.5u; y21=y20+.5u; pos21(stem,135); x22l=w-u; top y22r=h+1.5oo; |
| 236 |
pos22(hair,110); |
| 237 |
filldraw circ_stroke z2'e{up}...z20e...z21e...{up}z22e; |
| 238 |
penlabels(1,2,3,4); endchar; |
| 239 |
|
| 240 |
cmchar "The Russian letter e"; |
| 241 |
beginchar("e",7.25u#+max(.75u#,.5curve#),x_height#,0); |
| 242 |
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); |
| 243 |
adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi); |
| 244 |
numeric left_curve,right_curve; |
| 245 |
left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; |
| 246 |
if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi |
| 247 |
if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi |
| 248 |
pickup tiny.nib; pos1(right_curve,0); |
| 249 |
pos2(vair,90); pos3(left_curve,180); |
| 250 |
y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; |
| 251 |
rt x1r=hround min(w-.5u,w-u+.5right_curve); |
| 252 |
lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; |
| 253 |
{{interim superness:=more_super; |
| 254 |
filldraw stroke super_arc.e(1,2)}}; % right bowl |
| 255 |
y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; |
| 256 |
if serifs: pos4(vair',270); pos5(hair,360); |
| 257 |
y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; |
| 258 |
(x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); |
| 259 |
filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) |
| 260 |
...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal |
| 261 |
else: pos4(vair,270); |
| 262 |
filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc |
| 263 |
pickup fine.nib; pos4'(vair,270); z4=z4'; |
| 264 |
pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); |
| 265 |
y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; |
| 266 |
filldraw stroke term.e(4',5,right,1,4); fi % terminal |
| 267 |
path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); |
| 268 |
y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; |
| 269 |
forsuffixes $=l,r: |
| 270 |
x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor |
| 271 |
fill stroke z0e--z1'e; % crossbar |
| 272 |
penlabels(0,1,2,3,4,5); endchar; |
| 273 |
|
| 274 |
cmchar "The Russian letter ef (looks like phi)"; |
| 275 |
beginchar("f",11u#,asc_height#,asc_height#-x_height#); |
| 276 |
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; |
| 277 |
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); |
| 278 |
numeric phistem; phistem= if serifs: .825 fi stem; |
| 279 |
pickup tiny.nib; pos1(phistem,0); pos2(phistem,0); |
| 280 |
x1=hround .5w; x1=x2; top y1=h-2jut; bot y2=-d+2jut; |
| 281 |
pos10(hair,0); pos11(hair,90); pos12(curve,180); |
| 282 |
pos13(hair,270); pos14(hair,0); |
| 283 |
x10l=x14l=x1l; x12r=u; x11=x13=.5[x1,x12]; |
| 284 |
y10=.65x_height; top y11r=x_height+oo; |
| 285 |
bot y13r=-oo; y12=.5x_height; y14=.35x_height; |
| 286 |
filldraw stroke pulled_arc.e(10,11) & pulled_arc.e(11,12) |
| 287 |
& pulled_arc.e(12,13) & pulled_arc.e(13,14); |
| 288 |
filldraw stroke z1e--z2e; % stem |
| 289 |
%if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper serif |
| 290 |
% dish_serif(2,1,b,1/3,jut,c,1/3,jut); fi % lower serif |
| 291 |
if serifs: |
| 292 |
x1'r=rt x1r; x1'l=lft x1l; y1'r=y1'l=y1; |
| 293 |
x2'r=rt x2r; x2'l=lft x2l; y2'r=y2'l=y2; |
| 294 |
pickup crisp.nib; |
| 295 |
x41=x42=x1-jut; y41=h; y42=-d; |
| 296 |
if hefty: filldraw z1l--z41--z1r--cycle; filldraw z2l--z42--z2r--cycle; else: |
| 297 |
filldraw z1'l--z41--z1'r--cycle; filldraw z2'l--z42--z2'r--cycle; fi |
| 298 |
fi |
| 299 |
picture phicirc; phicirc=currentpicture; currentpicture:=nullpicture; |
| 300 |
slantswitch; clearxy; |
| 301 |
numeric phistem; phistem= if serifs: .825 fi stem; |
| 302 |
pickup tiny.nib; pos1(phistem,0); pos2(phistem,0); |
| 303 |
x1=hround .5w; x1=x2; top y1=h-2jut; bot y2=-d+2jut; |
| 304 |
pos10(hair,0); pos11(hair,90); pos12(curve,180); |
| 305 |
pos13(hair,270); pos14(hair,0); |
| 306 |
x10l=x14l=x1l; x12r=u; x11=x13=.5[x1,x12]; |
| 307 |
y10=.65x_height; top y11r=x_height+oo; |
| 308 |
bot y13r=-oo; y12=.5x_height; y14=.35x_height; |
| 309 |
filldraw stroke pulled_arc.e(10,11)&pulled_arc.e(11,12)&pulled_arc.e(12,13)&pulled_arc.e(13,14); |
| 310 |
filldraw stroke z1e--z2e; % stem |
| 311 |
%if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper serif |
| 312 |
% dish_serif(2,1,b,1/3,jut,c,1/3,jut); fi % lower serif |
| 313 |
if serifs: |
| 314 |
x1'r=rt x1r; x1'l=lft x1l; y1'r=y1'l=y1; |
| 315 |
x2'r=rt x2r; x2'l=lft x2l; y2'r=y2'l=y2; |
| 316 |
pickup crisp.nib; |
| 317 |
x41=x42=x1-jut; y41=h; y42=-d; |
| 318 |
if hefty: filldraw z1l--z41--z1r--cycle; filldraw z2l--z42--z2r--cycle; else: |
| 319 |
filldraw z1'l--z41--z1'r--cycle; filldraw z2'l--z42--z2'r--cycle; fi |
| 320 |
fi |
| 321 |
mirror(x1); addto currentpicture also phicirc; |
| 322 |
endchar; |
| 323 |
|
| 324 |
cmchar "The Serbian letter je"; |
| 325 |
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#); |
| 326 |
beginchar("j",5.5u#,min(asc_height#,10/7x_height#+.5dot_diam#),desc_depth#); |
| 327 |
define_whole_blacker_pixels(dot_diam); |
| 328 |
italcorr h#*slant-serif_fit#+.5stem#-2u#; |
| 329 |
adjust_fit(serif_fit#+2stem_shift# if monospace:+\\.5u# fi, |
| 330 |
serif_fit#-2stem_shift# if monospace:-.5u# fi); |
| 331 |
pickup tiny.nib; pos1(stem',0); pos2(stem',0); |
| 332 |
rt x1r=hround(.5w+.25u+.5stem'); x1=x2; |
| 333 |
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d; |
| 334 |
filldraw stroke z1e--z2e; % stem |
| 335 |
pos3(dot_diam,0); pos4(dot_diam,90); |
| 336 |
x3r=x1r; top y4r=h+1; |
| 337 |
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi |
| 338 |
x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot |
| 339 |
if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop); % upper serif |
| 340 |
pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180); |
| 341 |
x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d; |
| 342 |
if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi; |
| 343 |
(x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]); |
| 344 |
filldraw stroke z2e{down}...z5e{left}; bulb(5,6,7); % arc and bulb |
| 345 |
else: pickup fine.nib; pos2'(stem',0); z2'=z2; |
| 346 |
pos6(.2[vair,stem'],-90); pos7(vair,-90); |
| 347 |
lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo); |
| 348 |
(x,y7l)=whatever[z7r,z3]; x7l:=x; |
| 349 |
z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r; |
| 350 |
x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo; |
| 351 |
filldraw stroke z2'e..{down}z5e & super_arc.e(5,6) |
| 352 |
& z6e{left}..z7e; fi % arc and terminal |
| 353 |
penlabels(1,2,3,4,5,6,7); endchar; |
| 354 |
|
| 355 |
cmchar "The Russian letter o"; |
| 356 |
beginchar("o",9u#,x_height#,0); |
| 357 |
italcorr .7x_height#*slant; |
| 358 |
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); |
| 359 |
penpos1(vair,90); penpos3(vair',-90); |
| 360 |
penpos2(curve,180); penpos4(curve,0); |
| 361 |
x2r=hround max(.5u,1.25u-.5curve); |
| 362 |
x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; |
| 363 |
y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; |
| 364 |
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) |
| 365 |
& pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl |
| 366 |
penlabels(1,2,3,4); endchar; |
| 367 |
|
| 368 |
cmchar "The Russian letter er (looks like p)"; |
| 369 |
beginchar("r",10u#+serif_fit#,x_height#,desc_depth#); |
| 370 |
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); |
| 371 |
adjust_fit(serif_fit#,0); |
| 372 |
pickup tiny.nib; pos1(stem',0); pos2(stem,0); |
| 373 |
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; |
| 374 |
lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi; |
| 375 |
numeric edge; edge=rt x2r; |
| 376 |
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180); |
| 377 |
pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); |
| 378 |
rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]); |
| 379 |
y3=1/8[bar_height,x_height]; |
| 380 |
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; |
| 381 |
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; |
| 382 |
x6l=x4l-.2u; bot y6r=-oo; |
| 383 |
x7=x3; y7=min(y3,y6+y4-y3+.6vair); |
| 384 |
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); |
| 385 |
(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); |
| 386 |
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5) |
| 387 |
&super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl |
| 388 |
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); |
| 389 |
pickup tiny.nib; bot y2=-d; |
| 390 |
filldraw stroke z1e--z0'e--z0e--z2e; % stem |
| 391 |
pickup crisp.nib; pos8(hair,0); pos7'(stem,0); |
| 392 |
z7'=z2; x8l=x7'l; bot y8=0; |
| 393 |
filldraw stroke z7'e--z8e; % point |
| 394 |
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif |
| 395 |
dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif |
| 396 |
penlabels(0,1,2,3,4,5,6,7,8); endchar; |
| 397 |
|
| 398 |
cmchar "The Russian letter es (looks like c)"; |
| 399 |
beginchar("s",8u#,x_height#,0); |
| 400 |
italcorr x_height#*slant-.2u#; |
| 401 |
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); |
| 402 |
pickup fine.nib; pos2(vair',90); pos4(vair',270); |
| 403 |
x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; |
| 404 |
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h; |
| 405 |
if serifs: pos1(hair,0); pos0(flare,0); |
| 406 |
y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); |
| 407 |
rt x1r=hround(w-.7u); bulb(2,1,0); % bulb |
| 408 |
pos5(hair,0); rt x5r=hround(w-.5u); |
| 409 |
y5=max(good.y(.5bar_height-.9),y4l+vair'); |
| 410 |
(x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); |
| 411 |
filldraw stroke pulled_super_arc.e(2,3)(.7superpull) |
| 412 |
& pulled_super_arc.e(3,4)(.5superpull) |
| 413 |
..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal |
| 414 |
else: pos1(4/7[vair',flare],80); |
| 415 |
rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; |
| 416 |
filldraw stroke term.e(2,1,right,.8,4); % upper terminal |
| 417 |
pos5(.6[vair',flare],275); rt x5r=hround(w-.5u); |
| 418 |
y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; |
| 419 |
forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; |
| 420 |
if angle direction 1 of p.e>75: |
| 421 |
p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor |
| 422 |
filldraw stroke pulled_super_arc.e(2,3)(.7superpull) |
| 423 |
& pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal |
| 424 |
penlabels(0,1,2,3,4,5); endchar; |
| 425 |
|
| 426 |
cmchar "The Russian letter u (looks like y)"; |
| 427 |
beginchar("u",if serifs:9.5u# else:9u# fi,x_height#,desc_depth#); |
| 428 |
italcorr x_height#*slant+.25u#; |
| 429 |
adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); |
| 430 |
numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut; |
| 431 |
left_stem=fudged.stem-stem_corr; |
| 432 |
right_stem=fudged.hair if hefty:-2stem_corr fi; |
| 433 |
bot_stem=fudged.hair if hefty:-8stem_corr fi; |
| 434 |
bot_vair=Vround(if serifs: vair else:.5[vair,bot_stem] fi); |
| 435 |
outer_jut=.75jut; |
| 436 |
x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l; |
| 437 |
numeric alpha,alpha[]; x9=3u; y9=bot_vair-d-oo; |
| 438 |
alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr); |
| 439 |
alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9); |
| 440 |
if alpha1<alpha2: x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1; |
| 441 |
else: alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi |
| 442 |
penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0); |
| 443 |
alpha3=(y1++(x2l-x1l))/y1; |
| 444 |
penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0); |
| 445 |
z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); |
| 446 |
if y0>notch_cut: y0:=notch_cut; |
| 447 |
fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r) |
| 448 |
--z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1} |
| 449 |
...{down}z0+.5left--cycle; % left and right diagonals |
| 450 |
else: fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l |
| 451 |
--diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals |
| 452 |
penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; y5-.5vair=-.5d; |
| 453 |
if serifs: numeric light_bulb; light_bulb=hround 7/8[hair,flare]; clearpen; |
| 454 |
penpos6(vair,-90); penpos7(hair,-180); penpos8(light_bulb,-180); |
| 455 |
x6=2u; y6r=-d-oo; y8-.5light_bulb=-.85d; x8r=hround .35u; |
| 456 |
fill stroke z3e---z5e...{left}z6e; bulb(6,7,8); % arc and bulb |
| 457 |
numeric inner_jut; pickup tiny.nib; |
| 458 |
prime_points_inside(1,2); prime_points_inside(4,3); |
| 459 |
if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; |
| 460 |
else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi |
| 461 |
dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % left serif |
| 462 |
dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % right serif |
| 463 |
else: penpos6(bot_vair,-90); x6=2.5u; y6r=-d-oo; |
| 464 |
fill stroke z3e---z5e...{left}z6e; % arc |
| 465 |
pickup fine.nib; pos6'(bot_vair,-90); z6'=z6; |
| 466 |
pos7(2/3[bot_vair,flare],-85); |
| 467 |
lft x7l=hround u; bot y7r=vround-.96d-oo; y7l:=good.y y7l; |
| 468 |
filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal |
| 469 |
penlabels(0,1,2,3,4,5,6,7,8,9); endchar; |