% Blackboard bold lower case Greek, Alan Jeffrey, 15--18 Dec 1989.
%
% These characters occupy spaces oct "013" to oct "040", and oct "177".
% This is because ! occupies oct "041" and I have to stick omega 
% somewhere.

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

bbchar 
   (oct "013")
   (smallgap#, medlower#, smallgap# + jut#)
   (aTop#, aBottom#);
   
   "Lowercase Greek alpha";
   
   % The curve.
   var (path) alphapath;
   
   alphapath
      = Top~(Right + jut) {down}
           .. obelow Bottom~Middle {left}
           .. Horizon~Left {up}
           .. oabove Top~Middle {right}
           .. Bottom~(Right + jut){right};

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

   % The curve.
   draw alphapath

endchar;

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

bbchar
   (oct "014")
   (medgap#, smalllower# + fatness#, smallgap#)
   (bTop#, gBottom#);

   "Lowercase Greek beta";

   % The top curve.
   var (path) betapath;

   betapath
      = aBottom~Left
           --- aTop~Left
           .. oabove rightof Top~Middle {right}
           .. (Top -+- aTop)~Right {down}
           .. rightof aTop~Middle {left};

   % The emphasis
   draw
      fatcliponce
         (rightof Bottom~Left -- rightof oabove Top~Left)
         (betapath);

   % The top curve.
   draw betapath;

   % The bottom curve.
   draw
      rightof aTop~Middle {right}
         .. aMiddle~Right {down}
         .. obelow rightof aBottom~Middle {left}
         .. farrightof (aBottom + cCurl)~Left

endchar;

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

bbchar 
   (oct "015")
   (smallgap#, medlower#, smallgap#)
   (aTop#, gBottom#);

   "Lowercase Greek gamma";

   % The curve.
   var (path) gammapath;
   
   gammapath 
      = Top~Left {right}
           .. aBottom~Right {down}
           .. obelow Bottom~Middle {left}
           .. aBottom~Left {up}
           .. Top~Right {right};

   % The emphasis.
   draw
      fatcliptwice
         (obelow rightof Bottom~Left -- rightof Top~Left)
         (subpath (1,infinity) of gammapath);

   % The curve.
   draw gammapath

endchar;

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

bbchar
   (oct "016")
   (smallgap#, medlower#, smallgap#)
   (bTop#, aBottom#);

   "Lowercase Greek delta";

   % The path.
   var (path) deltapath;
   
   deltapath
      = aTop~Middle {left}
           .. aMiddle~Left {down}
           .. obelow Bottom~Middle {right}
           .. aMiddle~Right {up}
           .. aTop~Middle
           .. (aTop -+- Top)~Left {up}
           .. oabove Top~Middle {right}
           .. (Top - cCurl)~Right;

   % The emphasis, clipped by the first bit of the curve (ie the bowl).
   draw
      fatcliptwice
         (obelow rightof Bottom~Left -- rightof Top~Left)
         (subpath (0,4) of deltapath);

   % The curve.
   draw deltapath

endchar;

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

bbchar
   (oct "017")
   (smallgap#, medlower#, smallgap#)
   (aTop#, aBottom#);

   "Lowercase Greek epsilon";

   % The curve.
   var (path) epsilonpath;
   
   epsilonpath
      = (Top - cCurl)~Right
           .. oabove Top~Middle {left}
           .. aMiddle~Left {down}
           .. obelow Bottom~Middle {right}
           .. (Bottom + cCurl)~Right;

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

   % The curve.
   draw epsilonpath;

   % The bar.
   draw
      farrightof eBar~Left
         -- farrightof eBar~(Left + jut)

endchar;
   
% -------------------------------------------------------------------

bbchar 
   (oct "020")
   (medgap#, smalllower#, smallgap#)
   (bTop#, gBottom#);

   "Lowercase Greek zeta";
   
   % The curl.
   var (path) zetapath;
   
   zetapath
      = Top~Right
           .. aMiddle~Left {down}
           .. aBottom~Middle
           .. (aBottom -+- Bottom)~Right {down}
           .. Bottom~(Right - jut) {left};

   % The emphasis.
   draw
      fatcliptwice
         (rightof Bottom~Left -- rightof Top~Left)
         (zetapath);

   % The curl.
   draw zetapath

endchar;

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

bbchar
   (oct "021")
   (medgap#, smalllower# + fatness#, medgap#)
   (aTop#, gBottom#);

   "Lowercase Greek eta";
   
   % The emphasis.
   draw
      fatten
         rightof aBottom~Left
            -- rightof Top~Left;

   % The curl.
   draw
      farrightof (Top - cCurl)~Left
         .. oabove rightof Top~Middle {right}
         .. (Top - hCurl)~Right
         --- Bottom~Right

endchar;

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

bbchar
   (oct "022")
   (smallgap#, medlower#, smallgap#)
   (bTop#, aBottom#);

   "Lowercase Greek theta";
   
   % The curve.
   var (path) thetapath;
   
   thetapath
      = Horizon~Right {up}
           .. oabove Top~Middle {left}
           .. Horizon~Left {down}
           .. obelow Bottom~Middle {right}
           .. cycle;

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

   % The curve.
   draw thetapath;

   % The bar.
   draw
      farrightof Horizon~Left 
         -- Horizon~Right

endchar;

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

bbchar 
   (oct "023")
   (medgap#, tiny#, medgap#)
   (aTop#, aBottom#);

   "Lowercase Greek iota";
   
   % The vertical, clipped by a curve.
   draw
      fatcliponce
         (Top~Middle -- Bottom~Middle)
         (leftof (Bottom + hCurl)~Middle {down} 
             .. rightof Bottom~Middle {right})

endchar;

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

bbchar
   (oct "024")
   (medgap#, smalllower# + fatness#, smallgap#)
   (aTop#, aBottom#);

   "Lowercase Greek kappa";
   
   % The vertical.
   draw
      fatten
         rightof Bottom~Left
            -- rightof Top~Left;

   % The top stroke.
   draw
      farrightof eBar~Left
         -- Top~Right;

   % The bottom stroke.
   draw
      farrightof eBar~Left {right}
         .. Bottom~Right {right}

endchar;

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

bbchar
   (oct "025")
   (smallgap#, medlower#, smallgap#)
   (bTop#, aBottom#);

   "Lowercase Greek lambda";
   
   % The SW diagonal.
   draw
      Horizon~Middle
         -- Bottom~Left;

   % The SE diagonal, fattened.
   outline
      fatten
         rightof Top~Left
            -- leftof Bottom~Right

endchar;

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

bbchar
   (oct "026")
   (medgap#, smalllower# + fatness#, medgap#)
   (aTop#, gBottom#);

   "Lowercase Greek mu";
   
   % The left vertical, fattened.
   draw
      fatten
         rightof Bottom~Left 
            -- rightof Top~Left;

   % The curl.
   draw
      farrightof (aBottom + cCurl)~Left
        .. obelow rightof aBottom~Middle {right}
        .. (aBottom + hCurl)~Right
        --- Top~Right;

   % The right vertical.
   draw
      Top~Right
         -- aBottom~Right

endchar;

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

bbchar 
   (oct "027")
   (medgap#, medlower#, smallgap#)
   (aTop#, aBottom#);

   "Lowercase Greek nu";
   
   % The left vertical, clipped by the stroke.
   draw
      fatcliponce
         (rightof Top~Left -- rightof Bottom~Left)
         (Bottom~Left .. Top~Right {up});

   % The stroke.
   draw
      Bottom~Left 
         .. Top~Right {up}

endchar;

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

bbchar
   (oct "030")
   (medgap#, smalllower#, smallgap#)
   (bTop#, gBottom#);

   "Lowercase Greek xi";

   % The curls.
   var (path) xitop, xibottom;
   
   xibottom
      = farrightof aTop~(Left + jut) {left}
           .. aMiddle~Left {down}
           .. aBottom~Middle
           .. (aBottom -+- Bottom)~Right {down}
           .. Bottom~(Right - jut) {left};

   xitop
      = Top~Right {left}
           .. (Top -+- aTop)~Left {down}
           .. farrightof aTop~(Left + jut) {right};

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

   % The top curl.
   draw xitop;

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

   % The bottom curl.
   draw xibottom

endchar;

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

bbchar 
   (oct "031")
   (smallgap#, smalllower# + fatness#, smallgap#)
   (aTop#, aBottom#);

   "Lowercase Greek pi";
   
   % The top bar.
   draw
      Top~Left
         --- Top~Right;

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

   % The right vertical.
   draw
      Bottom~(Right - jut)
         -- Top~(Right - jut)

endchar;

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

bbchar 
   (oct "032")
   (medgap#, medlower#, smallgap#)
   (aTop#, gBottom#);

   "Lowercase Greek rho";
   
   % The bowl.
   var (path) rhopath;
   
   rhopath
      = aMiddle~Left {up}
           .. oabove aTop~Middle {right}
           .. aMiddle~Right {down}
           .. obelow aBottom~Middle {left}
           .. cycle;

   % The bowl.
   draw rhopath;
   
   % The emphasis, clipped by the beginning of the curve.
   outline
      fatcliponce
         (rightof Bottom~Left --  rightof bracketTop~Left)
         (subpath (0,2) of rhopath);

endchar;

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

bbchar
   (oct "033")
   (smallgap#, medlower#, smallgap# + jut#)
   (aTop#, aBottom#);

   "Lowercase Greek sigma";
   
   % The bowl.
   var (path) sigmapath;
   
   sigmapath
      = Horizon~Right {up}
           .. Top~Middle {left}
           .. Horizon~Left {down}
           .. obelow Bottom~Middle {right}
           .. cycle;

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

   % The bowl.
   draw sigmapath;
   
   % The bar, jutting out to the right.
   draw
      Top~Middle 
         -- Top~(Right + jut)

endchar;

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

bbchar
   (oct "034")
   (smallgap#, medlower#, smallgap#)
   (aTop#, aBottom#);
   
   fatsymmetric;

   "Lowercase Greek tau";
   
   % The top line.
   draw
      Top~Left
         -- Top~Right;

   % The vertical, clipped by a curve.
   draw
      fatcliponce
         (Top~Middle -- Bottom~Middle)
         (leftof (Bottom + hCurl)~Middle {down} 
             .. rightof Bottom~Middle {right})

endchar;

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

bbchar
   (oct "035")
   (medgap#, medlower#, medgap#)
   (aTop#, aBottom#);

   "Lowercase Greek upsilon";
   
   % The curve.
   var (path) upsilonpath;
   
   upsilonpath
      = Top~Left
           --- (Bottom + hCurl)~Left
           .. obelow Bottom~Middle {right}
           .. (Bottom + hCurl)~Right
           --- Top~Right;

   % The emphasis.
   draw
      fatcliponce
         (rightof Top~Left -- rightof obelow Bottom~Left)
         (upsilonpath);

   % The curve.
   draw upsilonpath

endchar;

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

bbchar
   (oct "036")
   (smallgap#, medlower#, smallgap#)
   (bTop#, gBottom#);
   
   fatsymmetric;

   "Lowercase Greek phi";
   
   % The bowl.
   draw
      Middle~Right {up}
        .. aTop~Middle {left}
        .. aMiddle~Left {down}
        .. aBottom~Middle {right}
        .. cycle;

   % The vertical, fattened.
   outline
      fatten
         Top~Middle
            -- Bottom~Middle

endchar;
   
% -------------------------------------------------------------------

bbchar
   (oct "037")
   (smallgap#, medlower#, smallgap#) 
   (aTop#, gBottom#);

   "Lowercase Greek chi";

   % The SE diagonal.
   draw
      Top~Left
         -- Bottom~Right;

   % The SW diagonal, fattened.
   outline
      fatten
         leftof Top~Right
            -- rightof Bottom~Left

endchar;

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

bbchar
   (oct "040")
   (medgap#, medlower#, medgap#)
   (bTop#, gBottom#);
   
   fatsymmetric;

   "Lowercase Greek psi";
   
   % The curve.
   draw
      aTop~Left
         --- (aBottom + hCurl)~Left
         .. aBottom~Middle {right}
         .. (aBottom + hCurl)~Right
         --- aTop~Right;

   % The vertical, fattened.
   outline
      fatten
         Top~Middle
            -- Bottom~Middle

endchar;

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

bbchar 
   (oct "177")
   (smallgap#, biglower#, smallgap#)
   (aTop#, aBottom#);
   
   symmetric;

   "Lowercase Greek omega";
   
   % The left curve.
   var (path) omegapath;
   
   omegapath
      = farrightof Top~Left
           .. Horizon~Left {down}
           .. obelow Bottom~(Left -+- Middle) {right}
           .. eBar~Middle {up};

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

   % The left curve.
   draw omegapath;
   
   % The right curve.
   draw
      eBar~Middle {down}
         .. obelow Bottom~(Right -+- Middle) {right}
         .. Horizon~Right {up}
         .. farleftof Top~Right

endchar;

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