home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / pc / 0600 / CCE_0690.ZIP / CCE_0690.PD / YANNIS / RGRLOWER.MF < prev    next >
Text File  |  1993-11-01  |  37KB  |  993 lines

  1. % These are the lowercase letters of the rgr-package version 1.1
  2. % prepared on Jan 16, 1990; Lille
  3. %
  4. % ALFA
  5.  
  6. def width =   9u enddef; 
  7. def height = x_height enddef;
  8. def dims = width#,height#,0 enddef;
  9. def ital = 0 enddef;
  10. def fit_params = 0,.5u# enddef;
  11.  
  12. def gen_letter =
  13.   pickup fine.nib;
  14.   pos1(stem,0); top y1=x_height+oo; rt x1r=hround(w-.5u);       %top right
  15.   pos2(vstem,-90); pos4(vstem,-270); x4=x2=.5w-u;
  16.   bot y2r=-oo; top y4r=x_height+oo;                     %bottom and top bulges
  17.   pos3(hair,-180); lft x3r=hround .75u; y3=.5[y2,y4];   %left bulge
  18.   pos6(vstem,90); x6=w-u; y6=y2;                        %bottom right
  19.  % numeric theta; theta=angle((x4-x6),2.5(y4-y6))-90;
  20.   pos5(hair,0); x5=.65[x4,x6]; y5=y3;               %point of inflection
  21.   alpha_tail(6,7);                                      %hook
  22.   filldraw stroke z1e{(x2-x1,2(y2-y1))}...              %diagonal
  23.    pulled_arc.e(2,3) & pulled_arc.e(3,4)                %bowl
  24.    ...z5e{down}...z6e{right}...{up}z7e;                 %diagonal and 
  25.   numeric x_baryctr; x_baryctr=  .25[x4,x1];   
  26.   numeric pos_stem; pos_stem=x_baryctr;                 %iota reference
  27. enddef;
  28.  
  29. cmchar "Lowercase alpha";
  30. beginchar("a",dims);
  31. this_letter; penlabels(1,2,3,4,5,6,7); endchar;
  32.  
  33. cmchar "Lowercase alpha with rough breathing";
  34. beginchar(oct"001",width#,acc_ht#,0);
  35. this_letter; spirit(x_baryctr)<; endchar;
  36.  
  37. cmchar "Lowercase alpha with smooth breathing";
  38. beginchar(oct"002",width#,acc_ht#,0);
  39. this_letter; spirit(x_baryctr)>; endchar;
  40.  
  41. cmchar "Lowercase alpha with acute";
  42. beginchar(oct"003",width#,acc_ht#,0);
  43. this_letter; acute(x_baryctr); endchar;
  44.  
  45. cmchar "Lowercase alpha with rough breathing and acute";
  46. beginchar(oct"004",width#,acc_ht#,0);
  47. this_letter; spirit_acute(x_baryctr)<; endchar;
  48.  
  49. cmchar "Lowercase alpha with smooth breathing and acute";
  50. beginchar(oct"005",width#,acc_ht#,0);
  51. this_letter; spirit_acute(x_baryctr)>; endchar;
  52.  
  53. cmchar "Lowercase alpha with circumflex";
  54. beginchar(oct"006",width#,circ_ht#,0);
  55. this_letter; circumflex(x_baryctr); endchar;
  56.  
  57. picture pic.iota;
  58. picture savedpicture;
  59.  
  60. % BHTA
  61.  
  62. def dims = 9u#,asc_height#,desc_depth# enddef;
  63. def ital = 0 enddef;
  64. def fit_params = 0,0 enddef;
  65.  
  66. def gen_letter=
  67.   pickup fine.nib; 
  68.   numeric thin_stem; thin_stem=.6[hair,stem];           % for upper bowl
  69.   numeric tilt; tilt=min(2*otilt,.5);                   % for both bowls
  70.   pos1(stem,180); y1-.5stem=-d-o;               % bottom left
  71.   pos2(hair,180); y2=.5bar_height;              % self-intersection (cf. z15)
  72.   x1=x2; lft x1r=hround(.75u+.5(hair-stem));    % i.e., lft x2r ~ .75u
  73.   x3r=x2r;                                      % beginning of curve
  74.   top y5r=h+oo; bot y14r=-oo; x5r=x14r;         % top and bottom bulges
  75.   top y10r=vstem+bot y9r=x_height; x9r=x10r;    % top and bottom of cusp
  76.   rt x12r=hround(w-.75u);                       % lower right bulge
  77.   x5r=.5[lft x2r,rt x12r]; x9r-.5vstem=hround(x5r-.5u-.5vstem);
  78.   %  we want to simulate the following relations, to make slopes consistent
  79.   %  (where |z7| is the upper right bulge):
  80.   % | z5r-z3r=whatever*(z9r-z7r)=whatever*(z14r-z12r);|
  81.   % | z7r-z5r=whatever*(z12r-z10r)=whatever*(z5r-z3r) yscaled -1;|
  82.   numeric slope;
  83.   slope=((y10r-y12r)+(y12r-y14r))/((x12r-x10r)+(x12r-x14r));
  84.   z7'r=z9r+whatever*(1,slope); z7'r=z5r+whatever*(1,-slope);
  85.   y7r=y7'r; rt x7r=hround rt x7'r;
  86.   z12r=z14r+whatever*(1,slope);
  87. z3r=z5r+whatever*(1,slope);
  88.   filldraw double_circ_stroke gr_arc.e(7,6,5)(hair,thin_stem,tilt)..
  89.     gr_arc.e(5,4,3)(hair,thin_stem,tilt)..{down}z2e..z1e;       % top and left
  90.   z2=z15; pos15(hair,slope-90);         % intersection pt
  91.   numeric slope;
  92.   slope=angle((z14r-z15)yscaled 2);
  93.   filldraw stroke z15e{dir slope}...gr_arc.e(14,13,12)(hair,stem,tilt); % bot
  94.   forsuffixes e=r,l:
  95.     path curv[]e; numeric S[]e;
  96.     curv1e=reverse gr_arc.e(9,8,7)(hair,thin_stem,tilt);        % cusp bottom
  97.     curv2e=gr_arc.e(12,11,10)(hair,stem,tilt); endfor           % cusp top
  98.   (S1r,S2r)=curv1r intersectiontimes curv2r;
  99.   (whatever,S2l)=curv1r intersectiontimes curv2l;
  100.   (S1l,whatever)=curv1l intersectiontimes curv2r;
  101.   if S1l=-1 : S1l:=2; fi
  102.   if S2l=-1 : S2l:=2; fi
  103.   filldraw stroke subpath(0,S1e+eps) of curv1e;                 % fill in cusp
  104.   filldraw stroke subpath(0,S2e+eps) of curv2e;
  105.   filldraw subpath (S1r+eps,2) of curv1r...subpath(2,S2r+eps) of curv2r..cycle;
  106. enddef;
  107.  
  108. cmchar "Lowercase beta";
  109. beginchar("b",dims);
  110. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
  111.  
  112. picture savedpicture;
  113.  
  114. % GAMMA
  115.  
  116. def dims = 10u#,x_height#,desc_depth# enddef;
  117. def ital = 0 enddef;
  118. def fit_params = 0,0 enddef;
  119.  
  120. def gen_letter=
  121.   pickup fine.nib;
  122.   begingroup
  123.     save t; t:=superness; interim superness:=.95t;
  124.     pos2(curve,90); top y2r=h+oo;                       % top of left branch
  125.     pos1(hair,180); bot y1=top y2r-4/3curve;            % tip of hook
  126.     lft x1r=hround .5u; x2-x1=y2-y1;                    % central arc is round
  127.     pos3(hair,0); pos4(hair,-180); rt x3r-lft x4r=stem; % bottom of cusp
  128.     y4=y3; .5[x3,x4]=.5w; bot y3=-d-oo;
  129.     pos5(curve,-270); top y5r=h+oo; x5+.5curve=hround(w-.75u); % right branch
  130.     pos5'(curve,0); z5'=z5;
  131.     filldraw stroke z1e{up}...z2e{right}; drawloop(2,3,4,5);    
  132.     filldraw z5l{right}...z5'r{up}...z5r{left}--cycle;  % right branch
  133.     if monowidth:                                       % complete stem
  134.       x3'=x3r; x4'=x4r; y3'=y4'; y3'-.5stem=vround(-.8d);
  135.       filldraw z3r--z3'{down}...{up}z4'--z4r--cycle; fi
  136.   endgroup; 
  137. enddef;
  138.  
  139. cmchar "Lowercase gamma";
  140. beginchar("g",dims);
  141. this_letter; penlabels(1,2,3,3',4,4',5); endchar;
  142.  
  143. picture savedpicture;
  144.  
  145. % DELTA
  146.  
  147.  
  148. def dims = 8.5u#,asc_height#,0 enddef;
  149. def ital = 0 enddef;
  150. def fit_params = 0,0 enddef;
  151.  
  152. def gen_letter =
  153.   pickup fine.nib;
  154.   top y1r=vround(if not monowidth:.95 fi x_height+oo); x1r=.5w; % top of loop
  155.   x5r=.5w; bot y5r=-oo;                                 % bottom of ditto
  156.   lft x3r=w-rt x7r=hround(.75u); y3r=y7r=.5[y1r,y5r];   % left and right bulge
  157.   filldraw stroke gr_arc.e(1,2,3)(vair,stem,.5otilt)    % three quadrants of l
  158.     & gr_arc.e(3,4,5)(vair,stem,.5otilt) & gr_arc.e(5,6,7)(vair,stem,.5otilt);
  159.  
  160.   % we now draw the hook |z8..z9..z10|.  It must satisfy the following ints:
  161.   % its outer contour is symmetric with respect to some axis containing |z9l|;
  162.   % one end is known, the width there is |thin_stem|, and the width at |z10|
  163.   % is, ideally, stem.  (But since we may have to change that we callt |Stem|.)
  164.   z8l=z1l; numeric thin_stem, med_stem; thin_stem=.5[hair,Stem];
  165.   % the aperture, measured perpendicular to the axis, equals |Stem|
  166.   numeric apert; apert=2Stem+thin_stem-currentbreadth;  % |apeth(z10l-z8l);|
  167.   numeric left_goal; lft left_goal=vround(lft x3r+.5u); % most tangent known
  168.   numeric top_goal; top top_goal=h+oo;                  % highest tangent known
  169.  
  170.   % if by taking |Stem=stem| we got |apert > top_goal-y1l|, the problem might
  171.   % not have a solution with a horizontal tangent; in that case the
  172.   % constraint is on |apert|:
  173.   if 2stem+.7[hair,stem]-currentbreadth>top_goal-y8l: apert=top_goal-y8l;
  174.   else: Stem=stem; fi
  175.  
  176.   % we first estimate the slope of the axis by imagining that, in the vicinity
  177.   % of |z9l|, the hook looks like a semicircle of diameter |apert/2|.
  178.   % (this value is empiric, but reasonable because the tension is high)
  179.   z0l=(left_goal+.25apert,top_goal-.25apert);           % center of semicircle
  180.   numeric axis; axis=angle(z0l-z8l)+angle(length(z0l-z8l)+-+.5apert,.5apert);
  181.   z9l=z0l+(.25apert,0)rotated(axis); z10l=z8l+(0,-apert)rotated(axis);
  182.  
  183.   % we now iterate, correcting |z9l| until the tangencies are satisfied
  184.   path hook; numeric left_real; numeric top_real;
  185.   forever:
  186.  
  187.     hook:=z8l{dir(axis)}..tension 1.5..z9l..tension 1.5..{-dir(axis)}z10l;
  188.     if directiontime up of hook=-1:
  189.       left_error:=0; message "hook has no vertical tangent!";
  190.     else: left_error:=xpart directionpoint up of hook-left_goal; fi
  191.     if directiontime right of hook=-1:
  192.       top_error:=0; message "hook has no horizontal tangent!";
  193.     else: top_error:=ypart directionpoint right of hook-top_goal; fi
  194.  
  195.     exitif (abs(left_error)<.05) and (abs(top_error)<.05);
  196.     x9l:=x9l-left_error; y9l:=y9l-top_error;
  197.     axis:=angle(z9l-z8l)+angle(length(z9l-z8l)+-+.5apert,.5apert);
  198.     x10l:=x8l+apert*sind axis; y10l:=y8l-apert*cosd axis;
  199.   endfor
  200.  
  201.   pos8(thin_stem,axis-90); pos10(Stem,axis+90); pos9(.3[hair,Stem],axis+180);
  202.   filldraw stroke
  203.     z7e{z7'e}..{dir axis}z8e..tension 1.5..z9e..tension 1.5..{-dir axis}z10e;
  204. enddef;
  205.  
  206. cmchar "Lowercase delta";
  207. beginchar("d",dims);
  208. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
  209.  
  210. picture savedpicture;
  211.  
  212. % EYILON
  213.  
  214. def width = 7.25u enddef;
  215. def height = x_height enddef;
  216. def dims = width#,height#,0 enddef;
  217. def ital = 0 enddef;
  218. def fit_params = 0,0 enddef;
  219.  
  220. def gen_letter =
  221.   pickup fine.nib;
  222.   pos2(.8vstem,90); x2=.5w; top y2r=x_height+o;           %   top point
  223.   pos7(vstem,630); x2=x7; bot y7r=-o;                   %   bottom point
  224.   rt x1r=hround(w-u); bot y1l=.3[bot y2l,bar_height];        %   top end
  225.   z1'=(x1r,y1l+.5(flare-currentbreadth));               %   approximation to z1
  226.   numeric slope; slope=angle((z2-z1')yscaled 2); pos1(.5flare,slope-30);
  227.   bar_height=.5[y1,y8]; x8=x1; pos8(flare,slope+90);    %   bottom end
  228.   pos3(vstem,120); lft x3r=hround .75u; y3=.5[y4r,y2r]; %   top left bulge
  229.   pos6(vstem,600); x6=x3; y6=.5[y5r,y7r];               %   bottom left bulge
  230.   y6:=y6r;y3:=y3r;                      %   for the benefit of |pulled_arc|
  231.   top y5r-bot y4r=curve; y5+y4=2bar_height; x5=x4=x2;   %   loop
  232.   pos4(vair,-90); pos5(vair,90);
  233.   filldraw stroke z1e{dir slope}...pulled_arc.e(2,3);   %   top
  234.   drawloop(3,4,5,6);                                    %   loop and bottom
  235.   forsuffixes e=l,r:
  236.     path foo.e; foo.e= z8e...pulled_arc.e(7,6);
  237.     if angle(direction 0 of foo.e) > angle(z8r-z8l):
  238.     foo.e:= z8e{z8r-z8l}...pulled_arc.e(7,6); fi
  239.   endfor;
  240.   filldraw stroke foo.e; 
  241.   numeric x_baryctr; x_baryctr=x2;                    %   accent reference
  242. enddef;
  243.  
  244. cmchar "Lowercase epsilon";
  245. beginchar("e",dims);
  246. this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;
  247.  
  248. cmchar "Lowercase epsilon with rough breathing";
  249. beginchar(oct"037",width#,acc_ht#,0);
  250. this_letter; spirit(x_baryctr)<; endchar;
  251.  
  252. cmchar "Lowercase epsilon with smooth breathing";
  253. beginchar(oct"040",width#,acc_ht#,0);
  254. this_letter; spirit(x_baryctr)>; endchar;
  255.  
  256. cmchar "Lowercase epsilon with acute";
  257. beginchar(oct"044",width#,acc_ht#,0);
  258. this_letter; acute(x_baryctr); endchar;
  259.  
  260. cmchar "Lowercase epsilon with rough breathing and acute";
  261. beginchar(oct"177",width#,acc_ht#,0);
  262. this_letter; spirit_acute(x_baryctr)<; endchar;
  263.  
  264. cmchar "Lowercase epsilon with smooth breathing and acute";
  265. beginchar(oct"046",width#,acc_ht#,0);
  266. this_letter; spirit_acute(x_baryctr)>; endchar;
  267.  
  268. picture savedpicture;
  269.  
  270. % ZHTA
  271.  
  272. def dims = 8.5u#,asc_height#,desc_depth# enddef;
  273. def ital = 0 enddef;
  274. def fit_params = 0,0 enddef;
  275.  
  276. def gen_letter=
  277.   pickup fine.nib;
  278.   pos4(hair,-180); y4=bar_height; lft x4r=hround(.75u);         % left bulge
  279.   pos6(hair,-180); rt x6l=hround(w-.75u); y6=-.5stem;           % bottom right
  280.   y3+.5stem=h+o; x3+.5stem=hround(rt x6l-.25u);                 % top right
  281.   numeric slope; slope=angle((z3-z4)xscaled 2); pos3(hair,slope+90);
  282.   pos5(stem,-90); bot y5r=0; x5=.5w;                            % inflection pt
  283.   pos7(vstem,-270); y6=.5[y7r,y5r]; x7-.5vstem=hround x5;
  284.   pos2(stem,slope+90); z2l=z3l; filldraw double_circ_stroke
  285.                                    % bowl and tail
  286.     z7e{right}...z6e{up}...z5e{left}...z4e{up}...z2e{dir slope};
  287.                             % where handle attaches
  288.   pos1(curve,0); lft x1l=hround(lft x4r+.25u); y1+.5curve=h+o;  % end of handle
  289.   filldraw circ_stroke z1e{down}...z3e{dir slope}; 
  290. enddef;
  291.  
  292. cmchar "Lowercase zeta";
  293. beginchar("z",dims);
  294. this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;
  295.  
  296. picture savedpicture; 
  297.  
  298. % HTA
  299.  
  300. def width = 8.5u enddef;
  301. def dims = width#,x_height#,desc_depth# enddef;
  302. def ital = 0 enddef;
  303. def fit_params = if straight: .75 else: .5 fi u#,0 enddef;
  304.  
  305. def gen_letter =
  306.  pickup fine.nib;
  307.   y1r-.5stem=-d-o; pos1(stem,0);
  308.   rt x2r=hround(w-.75u); y2r=.5x_height; pos2(hair,0);
  309.   lft x5r=hround(1.5u); y5-.5stem=-o; pos5(stem,-180);
  310.   top y4r=x_height+o; x4r=.5[lft x2l,rt x5l];
  311.   pos6(hair,180); y6=y2;
  312.   if straight:
  313.   x1=x2;x5=x6; pos4(stem,90);
  314.   filldraw double_circ_stroke z1e--pulled_arc.e(2,4)&pulled_arc.e(4,6)--z5e;
  315.  else:
  316.   x1r=x2r; z2'l=z2'r=up;
  317.   filldraw circ_stroke z1e{up}...gr_arc.e(2,3,4)(hair,stem,.8); % right leg
  318.   filldraw circ_stroke z5e{(z4-z5) yscaled 4}...z4e{-z4'e};     % left leg
  319.   z6r=((0,y2)--(w,y2)) intersectionpoint (z5r{(z4-z5) yscaled 4}...z4r{-z4'r});
  320.  fi
  321.  pos8(vstem,0); rt x8r=hround(lft x6r-.75u);            % end of handle
  322.  pos7(vstem,-90); top y7l=x_height+o; z8r=z7r;          % top of handle
  323.  filldraw circ_stroke z8e{up}...z7e{right}...z6e{down};
  324.  numeric x_baryctr; x_baryctr=.1[x4,x7];           % accent reference
  325.  numeric pos_stem; pos_stem=x5;                         % iota reference
  326. enddef;
  327.  
  328. cmchar "Lowercase eta";
  329. beginchar("h",dims);
  330. this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;
  331.  
  332. cmchar "Lowercase eta with rough breathing";
  333. beginchar(oct"007",width#,acc_ht#,desc_depth#);
  334. this_letter; spirit(x_baryctr)<; endchar;
  335.  
  336. cmchar "Lowercase eta with smooth breathing";
  337. beginchar(oct"010",width#,acc_ht#,desc_depth#);
  338. this_letter; spirit(x_baryctr)>; endchar;
  339.  
  340. cmchar "Lowercase eta with acute";
  341. beginchar(oct"011",width#,acc_ht#,desc_depth#);
  342. this_letter; acute(x_baryctr); endchar;
  343.  
  344. cmchar "Lowercase eta with rough breathing and acute";
  345. beginchar(oct"012",width#,acc_ht#,desc_depth#);
  346. this_letter; spirit_acute(x_baryctr)<; endchar;
  347.  
  348. cmchar "Lowercase eta with smooth breathing and acute";
  349. beginchar(oct"013",width#,acc_ht#,desc_depth#);
  350. this_letter; spirit_acute(x_baryctr)>; endchar;
  351.  
  352. cmchar "Lowercase eta with circumflex";
  353. beginchar(oct"014",width#,circ_ht#,desc_depth#);
  354. this_letter; circumflex(x_baryctr); endchar;
  355.  
  356. picture pic.iota;
  357. picture savedpicture;
  358.  
  359. % JHTA
  360.  
  361. def dims = 9u#,asc_height#,0 enddef;
  362. def ital = 0 enddef;
  363. def fit_params = 0,0 enddef;
  364.  
  365. def gen_letter=
  366.   pickup fine.nib;
  367.   lft x4r=w-rt x8r=hround .75u; y4r=y8r=.5h;            % left and right bulges
  368.   x2r=x6r=.5w; top y2r=h+o; bot y6r=-o;                 % top and bottom
  369.   filldraw stroke
  370.     gr_arc.e(8,1,2)(vair,stem,otilt) & gr_arc.e(2,3,4)(vair,stem,otilt) &
  371.     gr_arc.e(4,5,6)(vair,stem,otilt) & gr_arc.e(6,7,8)(vair,stem,otilt);
  372.   pos4`(bar,90); pos8`(bar,90); x4`=x4; x8`=x8; y4`=y8`=.05[y4,y2];
  373.   filldraw stroke z4`e--z8`e;                           % bar
  374. enddef;
  375.  
  376. cmchar "Lowercase theta";
  377. beginchar("j",dims);
  378. this_letter; penlabels(1,2,3,4,4`,5,6,7,8,8`); endchar;
  379.  
  380. picture savedpicture;
  381.  
  382. % IWTA
  383.  
  384. def width = 5u enddef;
  385. def dims = width#,x_height#,0 enddef;
  386. def ital = 0 enddef;
  387. def fit_params = if monospace: u#,u# else:0,2curve#-3u# fi enddef;
  388.  
  389. def gen_letter=
  390.   pickup fine.nib;
  391.   pos1(flare,180); lft x1r=hround u; top y1=x_height+oo;        % top
  392.   numeric neck; neck=.2[hair,stem];
  393.   pos2(neck,180); .2[lft x2r,rt x2l]=.2[lft x1r,rt x1l];        % neck
  394.   pos3(curve,-90); bot y3r=-oo;                                 % bottom
  395.   y2r=if monowidth:
  396.  2 else: 1.5 fi[bot y3r,top y3l]; z3r-z2r=whatever*(1,-1.25);
  397.   if monowidth:
  398.     y4r+.5neck=vround y2r; x3=.5[x2,x4]; pos4(neck,0);          % tip of hook
  399.     filldraw stroke z4e...z3e...z2e---z1e;
  400.   else:
  401.     z4l=z4r; top y4r=y2r; z4l-z3l=whatever*(1,1);
  402.     path p.r, p.l; forsuffixes e=r,l: p.e=z1e---z2e...z3e...z4e; endfor
  403.     rt x3.5r=hround(rt xpart directionpoint up of p.r);
  404.     z4'r=direction 3 of p.r; z3'r=direction 2 of p.r;
  405.     forever:                    % avoid bad vertical tangent between 2l and 3l
  406.       x2.5l:= rt xpart directionpoint down of p.l;
  407.       exitif abs(hround(x2.5l)-x2.5l)<.05;
  408.       x2l:=x2l+hround(x2.5l)-x2.5l; p.l:=(z1l---z2l...z3l...z4l);
  409.     endfor
  410.     p.r:=z1r---z2r...club.r(3,3.5,4);
  411.                                 % avoid bad vertical tangent between 3r and 4r
  412.     filldraw stroke p.e;
  413.   fi 
  414.   numeric x_baryctr; x_baryctr=x1;
  415. enddef;
  416.  
  417. cmchar "Lowercase iota";
  418. beginchar("i",dims);
  419. this_letter; penlabels(1,2,3,4); endchar;
  420.  
  421. cmchar "Lowercase iota with rough breathing";
  422. beginchar(oct"023",width#,acc_ht#,0);
  423. this_letter; spirit(x_baryctr if serifs: +.25u fi)<; endchar;
  424.  
  425. cmchar "Lowercase iota with smooth breathing";
  426. beginchar(oct"024",width#,acc_ht#,0);
  427. this_letter; spirit(x_baryctr if serifs: -.25u fi)>; endchar;
  428.  
  429. cmchar "Lowercase iota with acute";
  430. beginchar(oct"025",width#,acc_ht#,0);
  431. this_letter; acute(x_baryctr); endchar;
  432.  
  433. cmchar "Lowercase iota with rough breathing and acute";
  434. beginchar(oct"026",width#,acc_ht#,0);
  435. this_letter; spirit_acute(x_baryctr)<; endchar;
  436.  
  437. cmchar "Lowercase iota with smooth breathing and acute";
  438. beginchar(oct"027",width#,acc_ht#,0);
  439. this_letter; spirit_acute(x_baryctr)>; endchar;
  440.  
  441. cmchar "Lowercase iota with circumflex";
  442. beginchar(oct"030",width#,circ_ht#,0);
  443. this_letter; circumflex(x_baryctr); endchar;
  444.  
  445. picture savedpicture;
  446.  
  447. % KAPPA
  448.  
  449. def dims = 9.5u#,x_height#,0 enddef;
  450. def ital = 0 enddef;
  451. def fit_params = 0,0 enddef;
  452.  
  453. def gen_letter=
  454.  pickup fine.nib;
  455.  x1-.5stem=hround .75u; y1-.5stem=-o;                   % lower left
  456.  z1+z3=(w,h); z2=.5[z1,z3];                             % upper right and mid
  457.  z1'=(z3-z1) if monowidth: xscaled 1/2 fi;              % slope at 1 and 3
  458.  pos1(stem,angle z1'+90); pos2(.6[hair,stem],angle z1'+90);
  459.  pos3(stem,angle z1'+90);
  460.  filldraw double_circ_stroke z1e{z1'}..z2e..{z1'}z3e;   % diagonal stroke
  461.  z4=if monowidth: z1 else: 1/3[z1,z3] fi; z4-z1=z3-z7;  % handle attachments
  462.  z4'=if monowidth: z1' else: (z3-z1) xscaled .25 fi;    % slope at 4 and 7
  463.  pos4(hair,angle z4'-90); pos7(hair,angle z4'+90);
  464.  pos5(vstem,90); top y5r=h+o; pos6(vstem,180); z6l=z5l;
  465.  lft x6r=hround(x1-.5stem-.25u);
  466.  filldraw circ_stroke z6e{up}...z5e{right}...z4e{-z4'};         % left handle
  467.  pos8(.5[vstem,stem],-90); bot y8r=-o; rt x9r=hround(x3+.5stem+.25u);
  468.  pos9(.5[vstem,stem],0); z9l=z8l;
  469.  filldraw circ_stroke z9e{down}...z8e{left}...z7e{z4'}; % right handle
  470. enddef;
  471.  
  472. cmchar "Lowercase kappa";
  473. beginchar("k",dims);
  474. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
  475.  
  476. picture savedpicture;
  477.  
  478. % LAMBDA
  479.  
  480. def dims =  9.5u#,asc_height#,0 enddef;
  481. def ital = 0 enddef;
  482. def fit_params = -.25u#,-.25u# enddef;
  483. def krn = -.75u# enddef;
  484.  
  485. def gen_letter=
  486.   pickup fine.nib;
  487.   x1-.5stem=hround .75u; y1+.5stem=h;                   % top left
  488.   z1'=(1,.2); pos1(stem,angle z1'+90);                  % direction at z1
  489.   x3+x1=w; y3-.5stem=-oo; pos3(stem,-angle z1'+90);     % bottom right
  490.   y2=x_height-.5u; x2=.5[x1,x3];                            % attachment
  491.   z2'=(z3-z1)yscaled 2; pos2(hair,angle z2'+90);        % direction at z4
  492.   filldraw double_circ_stroke z1e{z1'}...
  493.     z2e{(z3-z1)yscaled 2}...{z1' yscaled -1}z3e;                % diagonal
  494.   lft x4l=hround.75u; bot y4l=0;                                % bottom left
  495.   numeric stem'; stem'=stem-currentbreadth; numeric slope;      % from z4 to z4
  496.   slope=angle(z2-z4l)+angle(length(z2-z4l)+-+.5stem',.5stem');
  497.   x4r=x4l+(stem'/sind slope); y4r=y4l; z4=.5[z4r,z4l];
  498.   path p; p=z1{z1'}...z2{(z3-z1)yscaled 2}...{z1' yscaled -1}z3;
  499.   forsuffixes e=r,l: z5e=(z4e--(z4e+2(z2-z4))) intersectionpoint p; endfor
  500.   filldraw stroke z4e{(z2-z4)if not monowidth: xscaled 1.2 fi}..z5e; 
  501. enddef;
  502.  
  503. cmchar "Lowercase lambda";
  504. beginchar("l",dims);
  505. this_letter; penlabels(1,2,3,4,5); endchar;
  506.  
  507. picture savedpicture;
  508.  
  509. % MI
  510.  
  511. def dims = 9.5u#,x_height#,desc_depth# enddef;
  512. def ital = 0 enddef;
  513. def fit_params = 0,.5stem# enddef;
  514.  
  515. def gen_letter=
  516.   pickup fine.nib;
  517.   y6+.5stem=h+o; pos6(stem,0); rt x6r=hround(w-vstem);          % top right
  518.  x5r=.5[x1,x6]; bot y5r=-oo;                                   % bottom of bowl
  519.   if straight:
  520.     lft x1r=hround .75 u; y1+.5stem=h+o; pos1(stem,180);        % top left
  521.     x4=x1; x9=x6; y9=y4=.5x_height; pos4(stem,180); pos9(stem,0);
  522.     pos5(vstem, 270);
  523.     filldraw double_circ_stroke z1e..pulled_arc.e(4,5)&pulled_arc.e(5,9)..z6e;
  524.     y8-.5stem=-d-oo; x8=x1; pos8(stem,180);                     % end of handle
  525.     filldraw circ_stroke z8e..z4e;
  526.   else:
  527.   lft x2r=rt x2l-stem=hround .75u;            % vertical tangents of left bulb
  528.     top y1r=h+o; x1r=.5[x2r,x2l]; z1=z1l=z1r; z1'r=-z1'l=left;  % top left
  529.     y3r=.4[y1r,y5r]; lft x3r=x1r-.5hair;                        % middle left
  530.     numeric tilt; tilt:=.6; path p.r, p.l;
  531.     p.l=gr_arc.l(3,4,5)(hair,.4[hair,stem],tilt)...{up}z6l;
  532.     p.r=subpath (2(1-tilt),2) of gr_arc.r(3,4,5)(fie,fo,fum)...{up}z6r;
  533.     z3.5r=z4r; z3.5'r=z4'r; z3.5l=z3l; z3.5'l=z3'l;             % a hybrid
  534.     filldraw double_circ_stroke club.e(1,2,3.5) & p.e;          % bowl
  535.     x8=lft x2r+.5stem; bot y8=-d-oo;                           % end of handle
  536.     pos8(stem,angle(z4'l xscaled 2)-120); z8'r=z8'l=z4'l xscaled 2;
  537.     assign_z3'r(z3'l);                          % so club.r won't get confused
  538.     lft x7r=rt x7l-max(hair,2)=lft x2r;         % vertical tangents of handle
  539.     filldraw double_circ_stroke club.e(3,7,8);  % handle
  540.     y9r=max(y4r+epsilon,-oo+2vstem);            % where hook attaches
  541.     z9r=((0,y9r)--(w,y9r)) intersectionpoint p.r; pos9(hair,0);
  542.   fi
  543.   pos10(vstem,90); y10l=y5r; x10-x9=vstem;              % bottom of hook
  544.   pos11(hair,180); top y11=bot y10l+4/3vstem;           % tip of hook
  545.   rt x11l=hround(x10+(y11-y10)+.5hair);                 % central arc is round
  546.   filldraw stroke z9e{down}..z10e{right}..{up}z11e;    % hook
  547. enddef;
  548.  
  549. cmchar "Lowercase mu";
  550. beginchar("m",dims);
  551. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;
  552.  
  553. picture savedpicture;
  554.  
  555. % NI
  556.  
  557. def dims = 8.5u#,x_height#,0 enddef;
  558. def ital = 0 enddef;
  559. def fit_params = 0,0 enddef;
  560.  
  561. def gen_letter =
  562.   pickup fine.nib;
  563.   rt x4r=hround(w-.75u); lft x4l-rt x4r=hround -.2[hair,stem];  % vert tangents
  564.   x5=lft x4l; y5+.5hair=h+oo; z5'l=z5'r=(u,-.2h);               % right tip
  565.   pos5(hair,angle z5'l+90);
  566. pos3(whatever,-90); bot y3r=-oo; x3=.5w; z3'l=z3'r=z5'l xscaled -2;   % bottom
  567. z3l+whatever*z3'l=z3r+(stem-currentbreadth)*(dir(angle z3'l-90)); % width=stem
  568.   filldraw circ_stroke club.e(5,4,3);                           % right stroke
  569.   y1+.5stem=h+oo; x1-.5stem=hround.75u;                         % left tip
  570.   z1'=(9u,-h); pos1(stem,angle z1'-90);
  571.   z2r=z3r; z2l-z3l=(hair-currentbreadth,0);
  572.   filldraw circ_stroke z1e{z1'}...{down}z2e;              % left stroke
  573. enddef;
  574.  
  575. cmchar "Lowercase nu";
  576. beginchar("n",dims);
  577. this_letter; penlabels(1,2,3,4,5); endchar;
  578.  
  579. picture savedpicture;
  580.  
  581. % XI
  582.  
  583. def dims = 8.5u#,asc_height#,desc_depth# enddef;
  584. def ital = 0 enddef;
  585. def fit_params = 0,0 enddef;
  586.  
  587. def gen_letter=
  588.   pickup fine.nib;
  589.   lft x7r=rt x7l-hair=hround(.75u); x7=.5[x7r,x7r];             % big bulge
  590.   pos8(stem,-90); bot y8r=0; x8=.5w; z8'r=z8'l=left;            % inflection pt
  591.   pos9(hair,-180); rt x9l=hround(w-.75u); y9=-.5stem;           % bottom right
  592.   y6+.5stem=x_height+o; x6+.5stem=hround(rt x9l-1.5u);          % middle right
  593.   numeric slope; slope=angle(5(x6-x7),y6-y8); pos6(stem,slope+90);
  594.   z6'r=z6'l=dir slope;
  595.   pos10(vstem,-270); y9=.5[y10r,y8r]; x10-.5vstem=hround x8;
  596.   filldraw double_circ_stroke                                   % bowl and tail
  597.     z10e{right}...z9e{up}...club.e(8,7,6);
  598.   pos5(hair,slope-90); z5l=z6r;                                 % attachment
  599.   z4=.5[z3,z5]+whatever*dir slope;                              % small bulge
  600.   pos4(hair,-180); lft x4r=hround(lft x7r+1.5u);
  601. y3+.5stem=h+o; x3+.5stem=hround(rt x9l-.25u); pos3(hair,slope+90);    % top rt
  602.   pos2(stem,slope+90); z2l=z3l;   
  603.   filldraw circ_stroke z2e{-dir slope}..z4{down}...z5e{dir slope};
  604.                         % where handle attaches
  605.   pos1(curve,0); lft x1l=hround(lft x7r+.25u); y1+.5curve=h+o;  % end of handle
  606.   filldraw circ_stroke z1e{down}...z3e{dir slope};
  607. enddef;
  608.  
  609. cmchar "Lowercase xi";
  610. beginchar("x",dims);
  611. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
  612.  
  613. picture savedpicture;
  614.  
  615. % OMIKRON
  616.  
  617. def width = 9.5u enddef;
  618. def dims = width#,x_height#,0 enddef;
  619. def ital = 0 enddef;
  620. def fit_params = 0,0 enddef;
  621.  
  622. def gen_letter =
  623.   pickup fine.nib;
  624.   lft x4r=hround .75u; x8r=w-x4r; y4r=y8r=.5x_height;   % top and bottom
  625.   top y2r=x_height+oo; bot y6r=-oo; x2r=x6r=.5w;        % right and left
  626.   filldraw stroke
  627.     gr_arc.e(8,1,2)(vair,curve,otilt) & gr_arc.e(2,3,4)(vair,curve,otilt) &
  628.     gr_arc.e(4,5,6)(vair,curve,otilt) & gr_arc.e(6,7,8)(vair,curve,otilt) ;
  629.   numeric x_baryctr; x_baryctr=x2;                      % accent reference
  630. enddef;
  631.  
  632.  
  633. cmchar "Lowercase omicron";
  634. beginchar("o",dims);
  635. this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;
  636.  
  637. cmchar "Lowercase omicron with rough breathing";
  638. beginchar(oct"137",width#,acc_ht#,0);
  639. this_letter; spirit(x_baryctr)<; endchar;
  640.  
  641. cmchar "Lowercase omicron with smooth breathing";
  642. beginchar(oct"140",width#,acc_ht#,0);
  643. this_letter; spirit(x_baryctr)>; endchar;
  644.  
  645. cmchar "Lowercase omicron with acute";
  646. beginchar(oct"103",width#,acc_ht#,0);
  647. this_letter; acute(x_baryctr); endchar;
  648.  
  649. cmchar "Lowercase omicron with rough breathing and acute";
  650. beginchar(oct"133",width#,acc_ht#,0);
  651. this_letter; spirit_acute(x_baryctr)<; endchar;
  652.  
  653. cmchar "Lowercase omicron with smooth breathing and acute";
  654. beginchar(oct"135",width#,acc_ht#,0);
  655. this_letter; spirit_acute(x_baryctr)>; endchar;
  656.  
  657. picture savedpicture;
  658.  
  659. % PI
  660.  
  661. def dims = 9.5u#,x_height#,0 enddef;
  662. def ital = 0 enddef;
  663. def fit_params = -.25,0 enddef;
  664.  
  665. def gen_letter =
  666.   pickup fine.nib;
  667.   pi_bar;                                                       % bar
  668.   pos4(hair,0); pos7(hair,0); y4=y7=y2;                         % attachments
  669.   lft x4l-(x1-.5hair)=lft x7l-rt x4r=rt x3-rt x7r;
  670.   pos5(hair,0); pos8(hair,0); y5=y8=.5x_height; x5=x4; x8=x7;   % midstems
  671.   x6+.5stem=hround(rt x4r if not straight:-.25u fi); y6-.5stem=-oo; % left stem
  672.   numeric slope; slope=angle((z5-z6)xscaled2); pos6(.44iota_dp,slope-90);
  673.   filldraw circ_stroke z6e...z5e---z4e;
  674.   x9=x7+1.5u; bot y9l=-oo; pos9(stem,90); alpha_tail(9,10);     % right stem
  675.   filldraw stroke z10e...z9e{left}...z8e---z7e; 
  676. enddef;
  677.  
  678. cmchar "Lowercase pi";
  679. beginchar("p",dims);
  680. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
  681.  
  682. picture savedpicture;
  683.  
  684. % RO
  685.  
  686. def width = 8.5u enddef;
  687. def height = x_height enddef;
  688. def depth = desc_depth enddef;
  689. def dims = width#,height#,depth# enddef;
  690. def ital = 0 enddef;
  691. def fit_params = 0,0 enddef;
  692.  
  693. def gen_letter =
  694.   pickup fine.nib;
  695.   lft x4r=hround .75u; x8r=w-x4r; y4r=y8r=.5h;          % left and right
  696.   top y2r=h+oo; bot y6r=-oo; x2r=x6r=.5w;               % top and bottom
  697.   filldraw stroke
  698.     gr_arc.e(4,5,6)(curve,vair,-otilt) & gr_arc.e(6,7,8)(curve,vair,-otilt) &
  699.     gr_arc.e(8,1,2)(curve,vair,-otilt) & gr_arc.e(2,3,4)(curve,vair,-otilt);
  700.   if straight:
  701.     y9-.5stem=-d-oo; x9=x4; pos9(stem,180);                     % end of handle
  702.     filldraw circ_stroke z9e..z4e;
  703.   else:
  704.     y9=-d-oo; x9=lft x4r+.5stem;                           % end of handle
  705.     pos9(stem,angle((z9-z4)xscaled3)-120); z9'r=z9'l=(z9-z4)xscaled3;
  706.     rt x10l=lft x10r+vair;                      % vertical tangents of handle
  707.     x10r=x4r-epsilon; assign_z4'r((-2eps,-1));  % so club.r won't get confused
  708.     filldraw double_circ_stroke club.e(4,10,9);
  709.   fi 
  710.   numeric x_baryctr; x_baryctr=x2;                     % breathing placement
  711. enddef;
  712.  
  713. cmchar "Lowercase rho";
  714. beginchar("r",dims);
  715. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
  716.  
  717. picture savedpicture;
  718.  
  719. % SIGMA
  720.  
  721. def dims= 8u#,x_height#,desc_depth# enddef; 
  722. def ital = 0 enddef;
  723. def fit_params = 0,0 enddef;
  724.  
  725. def gen_letter =
  726.   pickup fine.nib;
  727.   pos4(hair,-180); y4=.5h; lft x4r=hround .75u;                 %  left bulge
  728.   pos6(hair,-180); rt x6l=hround(w-.75u); y6=-.5stem;           %  bottom right
  729.   top y3r=h+oo; x3+.5stem=rt x6l; pos3(stem,90);                %  top right
  730. pos5(stem,-90); bot y5r=0; x5=.5w;                            %  inflection pt
  731.   pos7(vstem,-270); y6=.5[y7r,y5r]; x7-.5vstem=hround x5;
  732. filldraw double_circ_stroke                                   %  bowl and tail
  733.     z7e{right}...z6e{up}...z5e{left}...z4e{up}...z3e{right};
  734. enddef;
  735.  
  736. cmchar "Final lowercase sigma";
  737. beginchar("c",dims);
  738. this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;
  739.  
  740. numeric gen_sigma; gen_sigma=1;
  741.  
  742. def dim_sigma =  9.5u#,x_height#,0 enddef; 
  743. def ital_sigma = 0 enddef;
  744. def fit_params_sigma = 0,.75u# enddef;
  745.  
  746. def mid_sigma=
  747. italcorr ital_sigma; adjust_fit(fit_params_sigma);
  748. if known pic.c: currentpicture:=pic.c; else: gen_mid_sigma; fi
  749. if not working_hard : picture pic.c; pic.c=currentpicture; fi
  750. enddef;
  751.  
  752. def gen_mid_sigma =
  753.   pickup fine.nib;
  754.   lft x4r=hround .75u; rt x8r=w-lft x4r;        % left and right bulge
  755.   top y2r=h; bot y6r=-oo; x2r=x6r;              % top and bottom
  756.   numeric fake; fake=y2r-(vstem-currentbreadth); % approx height of |z2l|
  757.   2y4r=y2r+y6r; 2y8r=fake+y6r;
  758.   (x8r-x6r)/(y8r-y6r)=-(x4r-x6r)/(y4r-y6r);     % determine |x6r|
  759.   y1r=y2r;rt x1=hround(rt x8r+u); pos1(flare,90);       % tip
  760.   filldraw stroke z1e..gr_arc.e(2,3,4)(vstem,curve,otilt)
  761.     & gr_arc.e(4,5,6)(vair,curve,otilt)         % top stroke and left bowl
  762.     & gr_arc.e(6,7,8)(vair,curve,otilt);        % bottom part of right bowl
  763.   z9l=z2l; pos9(vair,180); z9'l=z2'l; z9'r=left;
  764.   filldraw stroke z8e{z8'e}..z9e{z9'e};      % top part of right bowl
  765. enddef;
  766.  
  767. cmchar "Initial and medial lowercase sigma";
  768. beginchar("s",dim_sigma);
  769. mid_sigma; penlabels(1,2,3,4,5,6,7,8,9); endchar;
  770.  
  771. picture savedpicture;
  772.  
  773. % TAU
  774.  
  775. def dims = 8.5u#,x_height#,0 enddef;
  776. def ital = 0 enddef;
  777. def fit_params = -.25,0 enddef;
  778.  
  779. def gen_letter=
  780.   pickup fine.nib;
  781.   pi_bar;                                                       % bar
  782.   pos4(hair,0); y4=y2; lft x4l-(x1-.5hair)=rt x3-rt x4r;        % attachment
  783.   pos5(hair,0); y5=.5x_height; x5=x4;                           % midstems
  784.   x6=x4+1.5u; bot y6l=-oo; pos6(stem,90); alpha_tail(6,7);      % stem
  785.   filldraw stroke z7e...z6e{left}...z5e---z4e; 
  786. enddef;
  787.  
  788. cmchar "Lowercase tau";
  789. beginchar("t",dims);
  790. this_letter; penlabels(1,2,3,6,7,8); endchar;
  791.  
  792. picture savedpicture;
  793.  
  794. % UPSILON
  795.  
  796. def width = 9u enddef;
  797. def dims = width#,x_height#,0 enddef;
  798. def ital = 0 enddef;
  799. def fit_params = 0,0 enddef;
  800.  
  801. def gen_letter=
  802.   pickup fine.nib;
  803.   y2+.5stem=x_height+o; x2-.5stem=hround.75u;                   % left tip
  804.   lft x4r=hround(x2-.5stem+.75u); y4r=.5x_height;               % left middle
  805.   y8r=y4r; rt x8r=hround(w-.75u);                               % right bulge
  806.   x6r=.5[x4r,x8r]; bot y6r=-oo;                                 % bottom
  807.   numeric tilt;
  808.   tilt:=min(2*otilt,.5);
  809.   filldraw stroke
  810.     gr_arc.e(6,7,8)(vair,stem,tilt) ;
  811.   filldraw stroke
  812.     gr_arc.e(4,5,6)(vair,.4[vair,stem],tilt) ;
  813.   y9+.5hair=x_height+o; x9=x8-u; pos9(hair,angle ((z8-z9) xscaled 2)+90);
  814.   filldraw circ_stroke z9e...{-z8'e}z8e;
  815.   pos2(stem,angle((z4-z2) xscaled 2)-90);
  816.   filldraw circ_stroke z2e...{z4'e}z4e;
  817.   numeric x_baryctr; x_baryctr=.5w; 
  818. enddef;
  819.  
  820. cmchar "Lowercase upsilon";
  821. beginchar("u",dims);
  822. this_letter; penlabels(1,2,3,4,5,6,7,8,9); endchar;
  823.  
  824. cmchar "Lowercase upsilon with rough breathing";
  825. beginchar(oct"031",width#,acc_ht#,0);
  826. this_letter; spirit(x_baryctr)<; endchar;
  827.  
  828. cmchar "Lowercase upsilon with smooth breathing";
  829. beginchar(oct"032",width#,acc_ht#,0);
  830. this_letter; spirit(x_baryctr)>; endchar;
  831.  
  832. cmchar "Lowercase upsilon with acute";
  833. beginchar(oct"033",width#,acc_ht#,0);
  834. this_letter; acute(x_baryctr); endchar;
  835.  
  836. cmchar "Lowercase upsilon with rough breathing and acute";
  837. beginchar(oct"034",width#,acc_ht#,0);
  838. this_letter; spirit_acute(x_baryctr)<; endchar;
  839.  
  840. cmchar "Lowercase upsilon with smooth breathing and acute";
  841. beginchar(oct"166",width#,acc_ht#,0);
  842. this_letter; spirit_acute(x_baryctr)>; endchar;
  843.  
  844. cmchar "Lowercase upsilon with circumflex";
  845. beginchar(oct"036",width#,circ_ht#,0);
  846. this_letter; circumflex(x_baryctr); endchar;
  847.  
  848. picture savedpicture;
  849.  
  850. % FI
  851.  
  852. def dims = 10.5u#,x_height#,desc_depth# enddef;
  853. def ital = 0 enddef;
  854. def fit_params = 0,0 enddef;
  855.  
  856. def gen_letter =
  857.   pickup fine.nib;
  858.   lft x4r=w-rt x8r=hround .75u; y4r=y8r=.5h;
  859.   x6r=.5[x4r,x8r]; bot y6r=-oo;
  860.   numeric tilt; tilt:=min(2*otilt,.5);
  861.   filldraw stroke gr_arc.e(6,7,8)(vair,stem,tilt) ;
  862.   filldraw stroke gr_arc.e(4,5,6)(vair,.5[vair,stem],tilt) ;
  863.   y2+.5stem=h+o; x2+.5stem=hround(x6-1.5u);
  864.   pos2(stem,angle((z2-z4)xscaled 2)+90);
  865.   filldraw circ_stroke z2e...{z4'e}z4e;
  866.   pos10(stem,180); pos11(hair,180);
  867.   y10-.5stem=-d-o; y11=.25h; x10=x11=x6;
  868.   x9r=.5[x10r,x8r]; top y9r=h+o;
  869.   filldraw stroke gr_arc.e(8,20,9)(.25[vair,stem],.5[vair,stem],.5tilt);
  870.   filldraw circ_stroke z10e..z11e{up}..{-z9'e}z9e; 
  871. enddef;
  872.  
  873. cmchar "Lowercase phi";
  874. beginchar("f",dims);
  875. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,20,21); endchar;
  876.  
  877. picture savedpicture;
  878.  
  879. % QI
  880.  
  881. def ital = 0 enddef;
  882. def fit_params = 0,0 enddef;
  883. def dims =  10u#,x_height#,desc_depth# enddef; 
  884.  
  885. def gen_letter=
  886.   pickup fine.nib;
  887.   x1-.5stem=hround .75u; y1+.5stem=h+oo;                % top left
  888.   z1'=(1,.2); pos1(stem,angle z1'+90);                  % direction at z1
  889.   x3+x1=w; y3-.5stem=-d-oo; pos3(stem,angle z1'+90);    % bottom right
  890.   z2=.5[z1,z3];                                         % attachment
  891.   z2'=(z3-z1)yscaled 2; pos2(hair,angle z2'+90);        % direction at z4
  892.   filldraw double_circ_stroke z1e{z1'}... z2e{(z3-z1)yscaled 2}...{z1'}z3e;
  893.   lft x7l=hround .75u; bot y7l=-d-oo; z2=.5[z7l,z8r]=.5[z7r,z8l];
  894.   numeric stem'; stem'=stem-currentbreadth;
  895.  numeric theta; theta=angle(z8r-z7l)+angle((x8r-x7l)++(y8r-y7l)+-+stem',stem');
  896.   x7r=x7l+(stem'/sind theta); y7r=y7l;
  897.   filldraw stroke z7e..z8e; 
  898. enddef;
  899.  
  900. cmchar "Lowercase chi";
  901. beginchar("q",dims);
  902. this_letter; penlabels(1,2,3,7,8); endchar;
  903.  
  904. picture savedpicture;
  905.  
  906. % YI
  907.  
  908. def dims = 10.5u#,asc_height#,desc_depth# enddef;
  909. def ital = 0 enddef;
  910. def fit_params = 0,0 enddef;
  911.  
  912. def gen_letter =
  913.   pickup fine.nib;
  914.   lft x2r=w-rt x6r=.75u; y2r=y6r=.6x_height;            % left and right bulges
  915.   x4r=.5[x2r,x6r]; bot y4r=-oo;                         % bottom
  916.   numeric tilt; tilt:=min(2*otilt,.5);
  917.   filldraw stroke gr_arc.e(4,5,6)(vair,stem,tilt) ;
  918.   filldraw stroke gr_arc.e(2,3,4)(vair,.4[vair,stem],tilt) ;
  919.   y7+.5hair=x_height+o; x7+.5hair=hround(rt x6r-.75u);          % right tip
  920.   pos7(hair,angle ((z6-z7) xscaled 2)+90);
  921.   filldraw circ_stroke z7e...{-z6'e}z6e;
  922.   y1+.5stem=x_height+o; x1-.5stem=hround(lft x2r+.5u);  % left tip
  923.   pos1(stem,angle((z2-z1) xscaled 2)-90);
  924.   filldraw circ_stroke z1e...{z2'e}z2e;
  925.   pos10(stem,0); pos9(hair,0); pos8(stem,0);            % vertical stroke
  926.   y10-.5stem=-d-o; y9=.25x_height; y8+.5stem=h+o; x10=x9=x8=x4;
  927.   filldraw double_circ_stroke z10e..z9e{up}..z8e; 
  928. enddef;
  929.  
  930. cmchar "Lowercase psi";
  931. beginchar("y",dims);
  932. this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
  933.  
  934. picture savedpicture;
  935.  
  936. % WMEGA
  937.  
  938. def width =  12u enddef; 
  939. def height = x_height enddef;
  940. def dims = width#,height#,0 enddef;
  941. def ital = 0 enddef;
  942. def fit_params = 0,0 enddef;
  943.  
  944. def gen_letter =
  945.   pickup fine.nib;
  946.   pos2(stem,-180); pos8(stem,360); lft x2r=w-rt x8r=hround.75u;
  947.   y2=y8=.8bar_height;                                   % left and right bulges
  948.   y4=y6=bar_height; .5[x4,x6]=.5w; rt x4r-lft x6r=stem;
  949. pos4(hair,0); pos6(hair,180);                         % left and right of loop
  950.   bot y3r=bot y7r=-oo; x3=.5[x2,x4]; x7+.25u=.5[x6,x8];
  951.   pos3(vstem,-150); pos7(vstem,330);                    % left and right bottom
  952.   top y1r=x_height+o=top y9r;                           % left tip
  953.   x1=.5[x2,.5w]; pos1(.2[stem,hair],angle(-.5w,y2-x_height)-90);
  954. x9=.5[x8,.5w]; pos9(.8[stem,hair],angle(-.5w,x_height-y2)-90);        % rt tip
  955.   filldraw stroke z1e{(z2-z1) xscaled 2}...z2e{down}...z3e{right};
  956.   filldraw stroke z7e{right}...{up}z8e...{(z9-z8) xscaled 2}z9e;
  957.   drawloop(3,4,6,7); 
  958.   numeric x_baryctr; x_baryctr=.5[x4,x6];
  959.   numeric pos_stem; pos_stem=x_baryctr; 
  960. enddef;
  961.  
  962. cmchar "Lowercase omega";
  963. beginchar("w",dims);
  964. this_letter; penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  965.  
  966. cmchar "Lowercase omega with rough breathing";
  967. beginchar(oct"015",width#,acc_ht#,0);
  968. this_letter; spirit(x_baryctr)<; endchar;
  969.  
  970. cmchar "Lowercase omega with smooth breathing";
  971. beginchar(oct"016",width#,acc_ht#,0);
  972. this_letter; spirit(x_baryctr)>; endchar;
  973.  
  974. cmchar "Lowercase omega with acute";
  975. beginchar(oct"017",width#,acc_ht#,0);
  976. this_letter; acute(x_baryctr); endchar;
  977.  
  978. cmchar "Lowercase omega with rough breathing and acute";
  979. beginchar(oct"020",width#,acc_ht#,0);
  980. this_letter; spirit_acute(x_baryctr)<; endchar;
  981.  
  982. cmchar "Lowercase omega with smooth breathing and acute";
  983. beginchar(oct"021",width#,acc_ht#,0);
  984. this_letter; spirit_acute(x_baryctr)>; endchar;
  985.  
  986. cmchar "Lowercase omega with circumflex";
  987. beginchar(oct"022",width#,circ_ht#,0);
  988. this_letter; circumflex(x_baryctr); endchar;
  989.  
  990. picture pic.iota;
  991. picture savedpicture;
  992.  
  993.