home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-bin2.lha / lib / texmf / fonts / ams / cyrillic / src / cyrspl.mf < prev    next >
Text File  |  1996-10-12  |  22KB  |  476 lines

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