home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / metafont.lha / MF / INPUTS / AMSFONTS / xbcaps.mf < prev   
Text File  |  1991-07-03  |  27KB  |  828 lines

  1. %% @metafontfile{
  2. %%     filename="xbcaps.mf",
  3. %%     version="2.1",
  4. %%     date="30-MAY-1991",
  5. %%     filetype="Metafont: driver",
  6. %%     copyright="Copyright (C) American Mathematical Society,
  7. %%            all rights reserved.  Copying of this file is
  8. %%            authorized only if either:
  9. %%            (1) you make absolutely no changes to your copy
  10. %%                including name; OR
  11. %%            (2) if you do make changes, you first rename it to some
  12. %%                other name.",
  13. %%     author="American Mathematical Society",
  14. %%     address="American Mathematical Society,
  15. %%            Technical Support Group,
  16. %%            P. O. Box 6248,
  17. %%            Providence, RI 02940,
  18. %%            USA",
  19. %%     telephone="401-455-4080 or (in the USA) 800-321-4AMS",
  20. %%     email="Internet: Tech-Support@Math.AMS.com",
  21. %%     codetable="ISO/ASCII",
  22. %%     checksumtype="line count",
  23. %%     checksum="828",
  24. %%     keywords="amsfonts, tex, metafont , AMSSymbols ",
  25. %%     abstract="This is the driver file for use with 
  26. %%            the Blackboard Bold characters in AMSFonts 2.1."
  27. %%     }
  28. %
  29. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  30.  
  31.  
  32. % Changes made by Stefan Lindner for version 2.1 to fix some 
  33. % rounding problems at low resolutions 03-Mar-1991
  34. % ru defined and substituted for u in drawings of characters.
  35.  
  36. def ru(expr A)=
  37.   begingroup
  38.   save rounded_u; rounded_u#:=A*u#;
  39.   define_whole_vertical_pixels(rounded_u);
  40.   rounded_u
  41.   endgroup
  42. enddef;
  43.  
  44. iff OK "A":  "The letter A";  beginchar("A",13unit#,cap#,0);
  45.  
  46.   top z20=(.48w,h+Aapex); pos20(Atip,0);
  47.   bot y3=0; z3l=whatever[z20l,(1.5unit,0)];
  48.   bot y6=0; z6r=whatever[z20r,(w-round(unit+u),0)];
  49.   z20l=z1l; z20r=z4r;
  50.   mpos(1,3)(Athin,constant_angle(z20l,(1.5unit,0),0));
  51.   mpos(4,6)(stem,constant_angle(z20r,(w-round(unit+u),0),0));
  52.   onaline(1l,3l)(2l);  y2l=c_round_bracket;
  53.   onaline(1r,3r)(2r);  y2r=c_inner_bracket;
  54.   onaline(4l,6l)(5l);  y5l=c_inner_bracket;
  55.   onaline(4r,6r)(5r);  y5r=c_thick_stem_bracket;
  56.   z40=whatever[.8[z1l,z1r],z2r]; z40=whatever[.8[z4r,z4l],z5l];
  57.   y41=round(.4[serif_thickness,y40]-Abar);        % bar bottom
  58.   y42=y41+Abar;
  59.    ref1=rightserif(z3,z1,z2l,z40,ru(7),bracket0)--z40;
  60.    ref2=z40--leftserif(z6,z4,z40,z5r,ru(7),bracket32);
  61.    ref3=(0,y41)--(w,y41);
  62.    ref4=(0,y42)--(w,y42);
  63.   x11=xpart (ref1 intersectionpoint ref3);
  64.   x12=xpart (ref2 intersectionpoint ref3);
  65.   x13=xpart (ref2 intersectionpoint ref4);
  66.   x14=xpart (ref1 intersectionpoint ref4);
  67.   y11=y12=y41; y13=y14=y42;
  68.  
  69.   p1=z20l--leftserif(z3,z1,z2l,z1r,ru(3),bracket0)--ref1--ref2--
  70.      rightserif(z6,z4,z5l,z5r,ru(2.5),bracket0)--z20r--cycle;
  71.   p2=z11--z12--z13--z14--cycle;
  72.  
  73.   showpoints(1,2,3,4,5,6,11,12,13,14,20,40,41,42);
  74.   draw_outlines;
  75.   endchar;
  76.  
  77.  
  78. iff OK "B":  "The letter B";  beginchar("B",12unit#,cap#,0); 
  79.   
  80.   top lft z1l=(round(ru(5)+2smallu),h); 
  81.   z2l=(x1l,h-c_thick_stem_bracket); 
  82.   z2r=(x1r,h-c_round_bracket); 
  83.   z3l=(x1l,c_thick_stem_bracket); 
  84.   z3r=(x1r,c_round_bracket);  
  85.   bot z4l=(x1l,0); 
  86.   mpos(1,4)(Bstem,0); 
  87.   z5l=(rt x1r+ru(4),y1); 
  88.   z5r=(rt x1r+ru(3),y1-Btopthin); 
  89.   onaline(1r,4r)(8l);  
  90.   bot y8l=.5h-smallu; pos8(Bmidthin,90); 
  91.   rt z6l=(w-round(1.5unit),.5[y5l,y8l]); pos6(Btopcurve,180); 
  92.   rt z9l=(w-round(ru(2.5)),.5[y10l,y8r]); pos9(Bbotcurve,180); 
  93.   z10l=(rt x1r+ru(4),y4); 
  94.   z10r=(rt x1r+ru(3),y4+Bbotthin);   
  95.   z7l=(rt x1r+ru(3),y8l); 
  96.   rt z7=(lft x9r-ru(3),.5[top y8l,y8r]); 
  97.   
  98.   p1=leftserif(z1,z4,z2l,z2r,ru(5.2),bracket4)-- 
  99.      leftserif(z4,z1,z3l,z3r,ru(5.2),bracket4)-- 
  100.      curve.br(z10l,.5,z9l,.7)--curve.tr(z9l,.7,z7,.5)-- 
  101.      curve.br(z7,.5,z6l,.5)--curve.tr(z6l,.8,z5l,.6)--cycle; 
  102.   p1'=z8l--z8r; 
  103.   p1''=curve.br(z8r,.6,z6r,.85)--curve.tr(z6r,.7,z5r,.5)... 
  104.        {left}z5r...{down}z2r--cycle; 
  105.   p2''=z8l--z3r{down}...{right}z10r-- 
  106.        curve.br(z10r,.6,z9r,.7)--curve.tr(z9r,.8,z7l,.6)--cycle; 
  107.   
  108.   showpoints(1,2,3,4,5,6,7,8,9,10); 
  109.   draw_outlines; 
  110.   endchar; 
  111.  
  112.  
  113. iff OK "C":  "The letter C";  beginchar("C",(1+12)*unit#,cap#,0);
  114.  
  115.   bot z2l=(max(7unit,.5w),-Cover);
  116.   y2r=y2l+Cbotthin;
  117.   x2r=x2l+(min(Cbotthin,abs(y2r-y2l)));
  118.   bot rt z1l=(w-ru(2),2unit);
  119.   ref1=z2l{right}...z1l; 
  120.   pos1(Ctip,angle(z1l-precontrol 1 of ref1)+ 90);
  121.   lft z3l=(round ru(2),.5h); pos3(Ccurve,0);
  122.   top z4l=(x2l,h+Cover);
  123.   y4r=y4l-Ctopthin;
  124.   x4r=x4l+(min(ru(.5),abs(y4r-y4l)));
  125.   bot rt z5=(w-round(unit+ru(.5)),h-3unit-ru(2.5));
  126.   z6=(x5,y4l);
  127.   z7=z6-(ru(2.5),ru(2.5));
  128.   p1=curve.tl(z4l,.5,z3l,.7)--curve.bl(z3l,.7,z2l,.5)...z1l--
  129.      z1r...reversecurve.bl(z3r,.7,z2r,.6)--reversecurve.tl(z4r,.6,z3r,.6)--
  130.      beak(z4r,z5,z6,z7,z4l,1.2)--cycle;
  131.  
  132.   showpoints(1,2,3,4,5,6,7);
  133.   draw_outlines;
  134.   endchar;
  135.  
  136.  
  137. iff OK "D":  "The letter D";  beginchar("D",13unit#,cap#,0); 
  138.     
  139.   top lft z1l=(round(ru(u)+smallu),h); 
  140.   z2l=(x1l,h-c_thick_stem_bracket); 
  141.   z2r=(x1r,h-c_round_bracket); 
  142.   z3l=(x1l,c_thick_stem_bracket); 
  143.   z3r=(x1r,c_round_bracket); 
  144.   bot z4l=(x1l,0); 
  145.   mpos(1,4)(stem,0); 
  146.   z5l=(rt x1r+ru(4),y4); 
  147.   z5r=(rt x1r+ru(3),y5l+Dbotthin); 
  148.   rt z6l=(w-u-2smallu,.52h); pos6(Dcurve,180); 
  149.   z7l=(rt x1r+ru(4),y1);    
  150.   z7r=(rt x1r+ru(3.5),y7l-Dtopthin); 
  151.   
  152.   p1=leftserif(z1,z4,z2l,z2r,ru(4.5),bracket4)-- 
  153.      leftserif(z4,z1,z3l,z3r,ru(4.5),bracket4)-- 
  154.      curve.br(z5l,.5,z6l,.7)--curve.tr(z6l,.7,z7l,.5)--cycle; 
  155.   p1''=curve.br(z5r,.5,z6r,.8)--curve.tr(z6r,.7,z7r,.5)... 
  156.       {down}z2r...z3r{down}...{right}z5r--cycle; 
  157.   
  158.   showpoints(1,2,3,4,5,6,7); 
  159.   draw_outlines; 
  160.   endchar; 
  161.   
  162.  
  163. iff OK "E":  "The letter E";  beginchar("E",(1+11)*unit#,cap#,0);
  164.  
  165.   top lft z1l=(round(ru(5.5)),h);                                    
  166.   z2l=(x1l,h-c_thick_stem_bracket);
  167.   z2r=(x1r,h-c_inner_bracket);
  168.   z3l=(x1l,c_thick_stem_bracket);
  169.   z3r=(x1r,c_inner_bracket);
  170.   bot z4l=(x1l,0);
  171.   mpos(1,4)(Estem,0);
  172.   bot rt z11=(w-unit,0);
  173.   top rt z12=(w-.5unit,3unit+ru(u));
  174.   z13=(.5w+.5unit,y4+Ebotarm);
  175.   z14=(min(x13,rt x4r+.5unit),y13);  
  176.   rt z21=(w-ru(4),y1);
  177.   bot z22=(x21,top y1-3.5unit);
  178.   z23=(ru(19),y1-Etoparm);
  179.   z24=(rt x1r+.5unit,y23);
  180.   onaline(1r,4r)(31,35);
  181.   bot y31=.5h-smallu;
  182.   y35=y31+Emidarm;
  183.   rt z33=(w-(3.8unit),.5[y31,y35]);
  184.   x32=x34=x33;
  185.   bot y32=bot y31-2.5unit;
  186.   top y34=bot y32+6unit;
  187.  
  188.   p1=leftserif(z4,z1,z3l,z3r,ru(4.75),.4)--
  189.      straightarm.br(z13,z12,z11,Ebot_tip,pullout)--z14{left}...{up}z3r--
  190.      z2r{up}...{right}z24--straightarm.tr(z23,z22,z21,Emid_tip,pulleven)--
  191.      leftserif(z1,z4,z2l,z2r,ru(4.75),.4)--cycle;
  192.   p1'=straightarm.br(z31,z32,z33,Emid_tip,pullin)--
  193.      straightarm.tr(z35,z34,z33,Emid_tip,pullin);
  194.  
  195.   showpoints(1,2,3,4,11,12,13,14,21,22,23,24,31,32,33,34,35);
  196.   draw_outlines;
  197.   endchar;
  198.  
  199.  
  200. iff OK "F":  "The letter F";  beginchar("F",(1+10)*unit#,cap#,0); 
  201.   
  202.   top lft z1l=(round(ru(5.5)),h); 
  203.   z2l=(x1l,h-c_thick_stem_bracket); 
  204.   z2r=(x1r,h-c_inner_bracket);    
  205.   z3l=(x1l,c_thick_stem_bracket); 
  206.   z3r=(x1r,c_inner_bracket);    
  207.   bot z4l=(x1l,0); 
  208.   mpos(1,4)(Fstem,0);
  209.   rt z21=(w-.5unit,y1); 
  210.   bot z22=(x21,top y1-3.5unit); 
  211.   z23=(ru(19),y1-Etoparm); 
  212.   z24=(rt x1r+.5unit,y23);
  213.   onaline(1r,4r)(31,35); 
  214.   bot y31=.5h-smallu; 
  215.   y35=y31+Emidarm; 
  216.   rt z33=(w-3unit,.5[y31,y35]); 
  217.   x32=x34=x33;   
  218.   bot y32=bot y31-2.5unit; 
  219.   top y34=bot y32+6unit;
  220.   
  221.   p1=fullserif(z4,z1,z3l,z3r,ru(4.75),ru(6),bracket4)--z2r{up}...{right}z24--
  222.      straightarm.tr(z23,z22,z21,Emid_tip,pulleven)--
  223.      leftserif(z1,z4,z2l,z2r,ru(4.75),bracket4)--cycle; 
  224.   p1'=straightarm.br(z31,z32,z33,Emid_tip,pullin)-- 
  225.      straightarm.tr(z35,z34,z33,Emid_tip,pullin); 
  226.   
  227.   showpoints(1,2,3,4,21,22,23,24,31,32,33,34,35); 
  228.   draw_outlines; 
  229.   endchar; 
  230.  
  231.  
  232. iff OK "G":  "The letter G";  beginchar("G",(1+13)*unit#,cap#,0);
  233.  
  234.   bot z2l=(max(7unit,.5w),-Gover);
  235.   y2r=y2l+Gbotthin;
  236.   x2r=x2l+(min(Gbotthin,abs(y2r-y2l)));
  237.   lft z3l=(round ru(2),.5h); pos3(Gcurve,0);
  238.   top z4l=(x2l,h+Gover);
  239.   y4r=y4l-Gtopthin;
  240.   x4r=x4l+(min(.5u,abs(y4r-y4l)));
  241.   bot rt z5=(w-round(2unit+.5u),h-3unit-ru(2.5));
  242.   z6=(x5,y4l);
  243.   z7=z6-(ru(2.5),ru(2.5));
  244.   top rt z11r=(rt x5+.5u,5unit+.5u);
  245.   bot z13r=(x11r,unit-2smallu);
  246.   mpos(11,13)(Gstem,0);
  247.   onaline(11r,13r)(12r); y12r=max(y11r-c_thick_stem_bracket,y13r);
  248.   onaline(11l,13l)(12l); y12l=max(y11l-c_thick_stem_bracket,y1