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 / cyrspu.mf < prev    next >
Text File  |  1996-10-12  |  13KB  |  280 lines

  1. %% @metafontfile{
  2. %%     filename="cyrspu.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="280",
  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. % cyrspu Uppercase forms having distinct lowercase forms
  32. % including O
  33.  
  34. cmchar "The Russian letter A";
  35. beginchar("A",13u#,cap_height#,0);
  36. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  37. numeric left_stem,right_stem,outer_jut,alpha;
  38. right_stem=cap_stem-stem_corr;
  39. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  40. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  41. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo;
  42. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  43. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  44. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  45. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  46. if y0<h-cap_notch_cut: y0:=h-cap_notch_cut;
  47.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  48.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  49.   ...{up}z0+.5left--cycle; % left and right diagonals
  50. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  51.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  52. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  53. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  54. if hefty: y5r else: y5 fi =5/12y0;
  55. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  56. if serifs: numeric inner_jut; pickup tiny.nib;
  57.  prime_points_inside(1,2); prime_points_inside(4,3);
  58.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  59.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  60.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  61.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  62. penlabels(0,1,2,3,4,5,6); endchar;
  63.  
  64. cmchar "The Russian letter B";
  65. beginchar("B",12.5u#,cap_height#,0);
  66. italcorr .75cap_height#*slant-.5u#;
  67. adjust_fit(cap_serif_fit#,0);
  68. numeric left_stem,right_curve,middle_weight;
  69. left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
  70. h:=vround(h-stem_corr);
  71. pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
  72. lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0;
  73. filldraw stroke z1e--z2e; % stem
  74. pickup crisp.nib;
  75. top y3r=h; x3=x1; pos3(slab,90); 
  76. rt x45r=hround(w-2u); y45=good.y(y3l-beak) - eps; pos45(hair,0);
  77. arm(3,45,e,beak_darkness,beak_jut);
  78. pickup tiny.nib;
  79. penpos4(cap_band,90);
  80. penpos6(middle_weight,-90); penpos7(middle_weight,-90);
  81. penpos8(middle_weight,90); penpos9(middle_weight,90);
  82. penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
  83. penpos11(cap_band,-90); penpos12(cap_band,-90);
  84. y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
  85. z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h;
  86. x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
  87. x5r=hround(w-1.5u); x10r=hround(w-u);
  88. if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u];
  89. else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
  90.  x4l:=x4l-.5u; x9l:=x9l-.5u; fi
  91. x6l:=x6l-.5u; x11l:=x11l-.5u;
  92. fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e;  % lower lobe
  93. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  94.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  95. math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  96.  
  97. cmchar "The Russian letter E";
  98. beginchar("E",12u#-width_adj#,cap_height#,0);
  99. italcorr cap_height#*slant-beak_jut#-.5u#;
  100. adjust_fit(cap_serif_fit#,0);
  101. h:=vround(h-stem_corr);
  102. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  103. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
  104. filldraw stroke z1e--z2e; % stem
  105. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  106. top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  107. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  108. pos5(cap_bar,-90); pos6(hair,0);
  109. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  110. pos0(cap_bar,90); pos7(hair,0);
  111. z0=z5; x6=x7; y6-y5l=y0l-y7;
  112. if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  113.  rt x9r=hround(w-.5u);
  114. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  115. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  116. pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
  117. bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  118. arm(8,9,h,beak_darkness,1.5beak_jut);  % lower arm and beak
  119. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  120.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  121. math_fit(0,.5ic#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  122.  
  123. cmchar "The Russian letter EF (looks like Phi)";
  124. beginchar("F",13u#,cap_height#,0);
  125. italcorr .5cap_height#*slant-.5u#;
  126. adjust_fit(0,0);
  127. numeric shaved_stem,light_curve;
  128. shaved_stem=cap_stem-hround 2stem_corr;
  129. light_curve=cap_curve-hround stem_corr;
  130. pickup tiny.nib; pos1(shaved_stem,0); pos2(shaved_stem,0);
  131. %lft x1l=lft x2l=hround(.5w-.5cap_stem); 
  132. x1=x2=.5w;
  133. top y1=h; bot y2=0;
  134. filldraw stroke z1e--z2e; % stem
  135. penpos3(vair,90); penpos5(vair,-90);
  136. penpos4(light_curve,180); penpos6(light_curve,0);
  137. x4r=hround u; x6r=w-x4r; x3=x5=.5w;
  138. y3r=vround(.85h if serifs:-slab fi); y4=y6=.5[y3,y5];
  139. y5r=vround(.15h if serifs:+slab fi);
  140. penstroke pulled_arc.e(3,4) & pulled_arc.e(4,5)
  141.  & pulled_arc.e(5,6) & pulled_arc.e(6,3) & cycle;  % bowl
  142. if serifs: dish_serif(1,2,a,1/3,1.25cap_jut,b,1/3,1.25cap_jut);  % upper serif
  143.  dish_serif(2,1,c,1/3,1.25cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
  144. math_fit(-.5cap_height#*slant-.5u#,ic#); penlabels(1,2,3,4,5,6); endchar;
  145.  
  146. cmchar "The Serbian letter JE";
  147. beginchar("J",9u#,cap_height#,0);
  148. italcorr cap_height#*slant-cap_serif_fit#
  149.  +.75cap_jut#-2.5u#+min(.5cap_stem#,u#);
  150. adjust_fit(0,cap_serif_fit#);
  151. pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
  152. top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h;
  153. if serifs: pos3(vair,-90); pos4(cap_hair,-180);
  154.  pos5(flare+(cap_stem-stem),-180);
  155.  bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r;
  156.  filldraw stroke z1e--z2e&super_arc.e(2,3);  % stem and arc
  157.  dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut);  % serif
  158.  bulb(3,4,5);  % bulb
  159. else: filldraw stroke z1e--z2e;  % stem
  160.  pickup fine.nib; pos3(cap_stem',0); z3=z2;
  161.  pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100);
  162.  bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o;
  163.  filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal
  164. math_fit(0,.5ic#-.5u#); penlabels(1,2,3,4,5); endchar;
  165.  
  166. cmchar "The Russian letter O";
  167. beginchar("O",14u#-width_adj#,cap_height#,0);
  168. italcorr .7cap_height#*slant-.5u#;
  169. adjust_fit(0,0);
  170. penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
  171. penpos2(cap_curve,180); penpos4(cap_curve,0);
  172. if monospace: x2r=hround 1.5u;
  173.  interim superness:=sqrt superness;  % make |"O"|, not |"0"|
  174. else: x2r=hround u; fi
  175. x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o;
  176. y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
  177. penstroke pulled_super_arc.e(1,2)(.5superpull)
  178.  & pulled_super_arc.e(2,3)(.5superpull)
  179.  & pulled_super_arc.e(3,4)(.5superpull)
  180.  & pulled_super_arc.e(4,1)(.5superpull) & cycle;  % bowl
  181. math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#); penlabels(1,2,3,4); endchar;
  182.  
  183. cmchar "The Russian letter ER (looks like P)";
  184. beginchar("R",12u#,cap_height#,0);
  185. italcorr .75cap_height#*slant-.5u#;
  186. adjust_fit(cap_serif_fit#,0);
  187. pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0);
  188. pos0(cap_stem',0); pos0'(cap_stem,0);
  189. lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
  190. x1l=x2l=x0l=x0'l; y0=y0'=y7;
  191. penpos3(cap_band,90); penpos4(cap_band,90);
  192. penpos5(cap_curve if hefty:-3stem_corr fi,0);
  193. penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90);
  194. z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
  195. x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u);
  196. x4l:=x6l:=x4-.25cap_curve;
  197. filldraw stroke z1e--z0e--z0'e--z2e; % stem
  198. fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;  % lobe
  199. if serifs: nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  200.  dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi  % lower serif
  201. math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); endchar;
  202.  
  203. cmchar "The Russian letter ES (looks like C)";
  204. if serifs: beginchar("S",13u#,cap_height#,0);
  205.  italcorr cap_height#*slant-.5u#;
  206.  adjust_fit(0,0);
  207.  pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
  208.  pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
  209.  rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
  210.  top y2r=h+o; bot y4r=-o; y3=.5[y2,y4];
  211.  bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps);
  212.  y5=max(good.y .95(h-y1),y4l+eps);
  213.  (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
  214.  (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
  215.  filldraw stroke z1e{x2-x1,10(y2-y1)}
  216.   ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
  217.  pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o;
  218.  x1r-x1'=2cap_curve-fine; y1'=y1;
  219.  path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
  220.  numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
  221.  filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
  222. else: beginchar("S",11.5u#,cap_height#,0);
  223.  italcorr cap_height#*slant-.5u#;
  224.  adjust_fit(0,0);
  225.  pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
  226.  pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
  227.  rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
  228.  lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
  229.  top y1r=vround .95h+o; top y2r=h+o; y3=.5h;
  230.  bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l;
  231.  filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  232.   & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
  233. math_fit(-.3cap_height#*slant-.5u#,.5ic#);
  234. penlabels(1,1',2,3,4,5,6); endchar;
  235.  
  236. cmchar "The Russian letter U (looks like Y)";
  237. beginchar("U",if serifs:13.5u# else:13u# fi,cap_height#,0);
  238. italcorr x_height#*slant+.25u#;
  239. adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
  240. numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut;
  241. left_stem=cap_stem-stem_corr;
  242. right_stem=1.25cap_hair if hefty:-2stem_corr fi;
  243. bot_stem=1.25cap_hair if hefty:-8stem_corr fi;
  244. bot_vair=Vround(if serifs: vair else:.5[vair,bot_stem] fi);
  245. outer_jut=.75cap_jut;
  246. x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=.3h; x2l=x3l;
  247. numeric alpha,alpha[]; x9=3u; y9=bot_vair-oo;
  248. alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr);
  249. alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9);
  250. if alpha1<alpha2: x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1;
  251. else: alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi
  252. penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0);
  253. alpha3=(y1++(x2l-x1l))/y1;
  254. penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0);
  255. z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r);
  256. if y0>cap_notch_cut+y2: y0:=cap_notch_cut+y2;   % +y2 added for sanserif face
  257.   fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r)
  258.     --z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  259.     ...{down}z0+.5left--cycle; % left and right diagonals
  260. else: fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l
  261.     --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  262. penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; y5+.5vair=.65y2;
  263. if serifs: numeric light_bulb; light_bulb=hround 1.1[hair,flare]; clearpen; %7/8[hair,flare]
  264.  penpos6(vair,-90); penpos7(hair,-180); penpos8(light_bulb,-180);
  265.  x6=.4[x8,x5]; y6r=-oo; y8-.5light_bulb=.5y2; x8r=hround 1.35u;
  266.  fill stroke z3e---z5e...{left}z6e; bulb(6,7,8);  % arc and bulb
  267.  numeric inner_jut; pickup tiny.nib;
  268.  prime_points_inside(1,2); prime_points_inside(4,3);
  269.  if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut;
  270.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  271.  dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut);  % left serif
  272.  dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark);  % right serif
  273. else: penpos6(bot_vair,-90); x6=2.5u; y6r=-oo;
  274.  fill stroke z3e---z5e...{left}z6e;  % arc
  275.  pickup fine.nib; pos6'(bot_vair,-90); z6'=z6;
  276.  pos7(2/3[bot_vair,flare],-85);
  277.  lft x7l=hround u; bot y7r=vround-oo; y7l:=good.y y7l;
  278.  filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal
  279. penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  280.