%    Copyright (C) 1991 Silvio Levy
%     
%    This file is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 2 of the License, or
%    (at your option) any later version.
%
%    This file is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with this program.  If not, see <http://www.gnu.org/licenses/>.
%
%    As a special exception, if you create a document which uses this font,
%    and embed this font or unaltered portions of this font into the
%    document, this font does not by itself cause the resulting document to
%    be covered by the GNU General Public License. This exception does not
%    however invalidate any other reasons why the document might be covered
%    by the GNU General Public License. If you modify this font, you may
%    extend this exception to your version of the font, but you are not
%    obligated to do so. If you do not wish to do so, delete this exception
%    statement from your version.

if unknown gen_sigma : readfrom("gen_sigma") fi
     
def dims = 9.5u#,x_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,.5stem# enddef;
     
def gen_letter=
  pickup fine.nib;
  y6+.5stem=h+o; pos6(stem,0); rt x6r=hround(w-vstem);          %top right
  x5r=.5[x1,x6]; bot y5r=-oo;                                   %bottom of bowl
  if straight:
    lft x1r=hround .75 u; y1+.5stem=h+o; pos1(stem,180);        %top left
    x4=x1; x9=x6; y9=y4=.5x_height; pos4(stem,180); pos9(stem,0);
    pos5(vstem, 270);
    filldraw double_circ_stroke z1e..pulled_arc.e(4,5)&pulled_arc.e(5,9)..z6e;
    y8-.5stem=-d-oo; x8=x1; pos8(stem,180);                     %end of handle
    filldraw circ_stroke z8e..z4e;
  else:
    lft x2r=rt x2l-stem=hround .75u;            %vertical tangents of left bulb
    top y1r=h+o; x1r=.5[x2r,x2l]; z1=z1l=z1r; z1'r=-z1'l=left;  %top left
    y3r=.4[y1r,y5r]; lft x3r=x1r-.5hair;                        %middle left
    numeric tilt; tilt:=.6; path p.r, p.l;
    p.l=gr_arc.l(3,4,5)(hair,.4[hair,stem],tilt)...{up}z6l;
    p.r=subpath (2(1-tilt),2) of gr_arc.r(3,4,5)(fie,fo,fum)...{up}z6r;
    z3.5r=z4r; z3.5'r=z4'r; z3.5l=z3l; z3.5'l=z3'l;             %a hybrid
    filldraw double_circ_stroke club.e(1,2,3.5) & p.e;          %bowl
    x8=lft x2r+stem; y8-.5stem=-d-oo;                           %end of handle
    pos8(stem,angle(z4'l xscaled 2)-90); z8'r=z8'l=z4'l xscaled 2;
    assign_z3'r(z3'l);                          %so club.r won't get confused
    lft x7r=rt x7l-max(hair,2)=lft x2r;         %vertical tangents of handle
    filldraw double_circ_stroke club.e(3,7,8);  %handle
    y9r=max(y4r+epsilon,-oo+2vstem);            %where hook attaches
    z9r=((0,y9r)--(w,y9r)) intersectionpoint p.r; pos9(hair,0);
  fi
  pos10(vstem,90); y10l=y5r; x10-x9=vstem;              %bottom of hook
  pos11(hair,180); top y11=bot y10l+4/3vstem;           %tip of hook
  rt x11l=hround(x10+(y11-y10)+.5hair);                 %central arc is round
  filldraw stroke z9e{down}..z10e{right}..{up}z11e;     %hook
enddef;
     
cmchar "Lowercase mu";
beginchar("m",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;
     
if boolean barebones: picture savedpicture; endinput; fi
     
cmchar "Lowercase sigma followed by mu";
begindoublechar(oct"015",dim_sigma);
mid_sigma; middoublechar(dims); this_letter; endchar;
     
picture savedpicture;
