metafont
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

bbnum.mf
text/plain

Download raw (6.0 KB)

% Blackboard bold numerals, Alan Jeffrey, 12--18 Dec 1989.

% -------------------------------------------------------------------

bbnum ("0");
   "The number 0";

   % The curve.
   var (path) zeropath;
   
   zeropath 
      = oabove Top~Middle {left} 
           .. Horizon~Left {down}
           .. obelow Bottom~Middle {right}
           .. Horizon~Right {up}
           .. cycle;
   
   % The emphasis.
   draw
      fatcliptwice
         (obelow rightof Bottom~Left -- oabove rightof Top~Left)
         (zeropath);

   % The curve.
   draw zeropath;

endchar;

% -------------------------------------------------------------------

bbnum ("1");

   fatsymmetric;

   "The number 1";

   % The top serif.
   draw
      rightof Top~Middle
        -- (Top - CCurl)~Left;

   % The vertical, clipped by the top serif.
   draw
      fatcliponce
         (Bottom~Middle -- Top~Middle)
         (rightof Top~Middle -- (Top - CCurl)~Left);

   % The bottom serif.
   draw
      Bottom~Left 
         -- Bottom~Right

endchar;

% -------------------------------------------------------------------

bbnum ("2");
   "The number 2";

   % The outline.
   var (path) twopath;
   
   twopath 
      = (Top-CCurl)~Left
           .. oabove Top~Middle {right}
           .. (Top -+- threeBar)~Right {down}
           .. Bottom~Left {down};

   % The emphasis.
   draw
      fatcliptwice
         (leftof Bottom~Right -- oabove leftof Top~Right)
         (twopath);

   % The curve.
   draw twopath;
   
   % The base line.
   draw
      Bottom~Left
         -- Bottom~Right

endchar;

% -------------------------------------------------------------------

bbnum ("3");
   "The number 3";

   % The curve.
   var (path) threepath;
   
   threepath
      = (Top - CCurl)~Left
           .. oabove Top~Middle {right}
           .. (Top -+- threeBar)~Right {down}
           .. threeBar~Middle {left}
           &  threeBar~Middle {right}
           .. (threeBar -+- Bottom)~Right {down}
           .. obelow Bottom~Middle {left}
           .. (Bottom + CCurl)~Left;

   % The top emphasis.
   draw
      fatcliptwice
         (leftof threeBar~Right -- oabove leftof Top~Right)
         (threepath);

   % The bottom emphasis.
   draw 
      fatcliptwice
         (obelow leftof Bottom~Right -- leftof threeBar~Right)
         (threepath);

   % The curve.
   draw threepath

endchar;

% -------------------------------------------------------------------

bbnum ("4");
   "The number 4";

   % The right of the vertical is jut away from the right of the character.
   var (numeric) verticalRight;
   
   verticalRight + jut = Right;

   % The bar.
   draw
      ABar~Left 
         -- ABar~Right;

   % The vertical, fattened and clipped by the diagonal.
   outline
      fatcliponce
         (leftof Bottom~verticalRight -- leftof Top~verticalRight)
         (Top~verticalRight -- ABar~Left);

   % The diagonal.
   draw
      Top~verticalRight
         -- ABar~Left

endchar;

% -------------------------------------------------------------------

bbnum ("5");
   "The number 5";

   % The top horizontal.
   draw
      Top~Left 
         -- Top~Right;

   % The vertical, fattened.
   draw
      fatten
         rightof (Bottom + sixBowl)~Left
            -- rightof Top~Left;

   % The curve.
   draw
      (Bottom + sixBowl)~Left
         --- (Bottom + sixBowl)~Middle
         .. (Bottom + 1/2sixBowl)~Right {down}
         .. obelow Bottom~Middle {left}
         .. (Bottom + CCurl)~Left

endchar;

% -------------------------------------------------------------------

bbnum ("6");
   "The number 6";

   % The bowl.
   var (path) sixpath;
   
   sixpath
      = (Bottom + 1/2sixBowl)~Right {up}
           .. (Bottom + sixBowl)~Middle {left}
           .. (Bottom + 1/2sixBowl)~Left {down}
           .. obelow Bottom~Middle {right}
           .. cycle;

   % The tail.
   draw
      (Bottom + 1/2sixBowl)~Left 
         --- (Bottom + sixBowl)~Left
         .. oabove Top~Middle {right}
         .. (Top - CCurl)~Right;

   % The emphasis.
   draw
      fatcliptwice
         (obelow rightof Bottom~Left -- rightof (Bottom + sixBowl)~Left)
         (sixpath);

   % The bowl.
   draw sixpath

endchar;

% -------------------------------------------------------------------

bbnum ("7");
   "The number 7";

   % The vertical.
   draw
      Top~Left
         -- Top~Right;

   % The diagonal.
   draw
      fatten
         rightof Bottom~Left
            -- leftof Top~Right

endchar;

% -------------------------------------------------------------------

bbnum ("8");
   "The number 8";

   % The bowls.
   var (path) eighttop, eightbottom;
   
   eighttop
      = oabove Top~Middle {left}
           .. (Top -+- threeBar)~Left {down}
           .. threeBar~Middle {right}
           .. (threeBar -+- Top)~Right {up}
           .. cycle;
 
   eightbottom
      = threeBar~Middle {left}
           .. (threeBar -+- Bottom)~Left {down}
           .. obelow Bottom~Middle {right}
           .. (Bottom -+- threeBar)~Right {up}
           .. cycle;

   % The top emphasis.
   draw
      fatcliptwice
         (obelow rightof Bottom~Left -- oabove rightof Top~Left)
         (eighttop);

   % The bottom emphasis.
   draw
      fatcliptwice
         (obelow rightof Bottom~Left -- oabove rightof Top~Left)
         (eightbottom);

   % The top bowl.
   draw eighttop;

   % The bottom bowl.
   draw eightbottom

endchar;

% -------------------------------------------------------------------

bbnum ("9");
   "The number 9";

   % The bowl.
   var (path) ninepath;
   
   ninepath
      = (Top - sixBowl)~Middle {left}
           .. (Top - 1/2sixBowl)~Left {up}
           .. oabove Top~Middle {right}
           .. (Top - 1/2sixBowl)~Right {down}
           .. cycle;

   % The tail.
   draw
      (Top - 1/2sixBowl)~Right
         --- (Top - sixBowl)~Right
         .. obelow Bottom~Middle {left}
         .. (Bottom + CCurl)~Left;

   % The emphasis.
   draw
      fatcliptwice
         (oabove rightof Top~Left -- rightof (Top - sixBowl)~Left)
         (ninepath);

   % The bowl.
   draw ninepath

endchar;

% -------------------------------------------------------------------