]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-toevallig.mf
* Another grand 2003 update.
[lilypond.git] / mf / feta-toevallig.mf
index 4d0150d02a40992ca400f223029cf37846881244..be80c6089dc1c93385362603969330c9c573d9ee 100644 (file)
@@ -3,7 +3,7 @@
 % 
 % source file of the Feta (Font-En-Tja) music font
 % 
-% (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 % 
 
 
@@ -96,7 +96,7 @@ fet_beginchar("Sharp" , "1", "sharp");
 %
 
 fet_beginchar( "Natural", "0", "natural")
-       save height;    
+       save height, xcenter;
        save interbeam, interstem, beamheight, beamwidth, 
        stemwidth;
        save top_stem_thick;
@@ -163,20 +163,35 @@ fet_beginchar( "Natural", "0", "natural")
 %
 
 % TODO: remove crook_fatness
+% TODO: document, simplify!
+%
 def draw_meta_flat(expr xcenter, w, crook_fatness) =
        clearxy;
        save crook_thinness;
-       save top_stem_thick, bottom_stem_thick, hair;
+       save top_stem_thick, bottom_stem_thick, hair, smaller_hole;
        save center;
        pair center;
+       save clearing;
        center = (xcenter, 0);
 
+% the shouldn't reach to the top staff line.
+%% TODO: should take from height.
+       clearing = 1.2 stafflinethickness; 
+
+%
+%  TODO: parameterize  this
+%
+       if w >= 0.75 staff_space:
+               smaller_hole = 0.2 stafflinethickness;
+       else:
+               smaller_hole = 0.0 stafflinethickness;
+       fi
        crook_thinness = 1.25 stafflinethickness;
-       top_stem_thick = 2 stafflinethickness;
+       top_stem_thick = 2.2 stafflinethickness;
        bottom_stem_thick = 1.2 stafflinethickness;
 
 
-       z1 = (0, 2 staff_space) + center;
+       z1 = (0, 2 staff_space) + center - (0, stafflinethickness/2 + clearing);
        z2 = (0, - 1/2 staff_space)+  center;
 
        penpos1(top_stem_thick, 0);
@@ -188,8 +203,10 @@ def draw_meta_flat(expr xcenter, w, crook_fatness) =
        y3l = (staff_space - stafflinethickness)/2 + ypart center;
        z3l = whatever [z2r,z1r];
 
-       z3r = .26 [z2r, z1r];
+       z3r = .26 [z2r, z1r] + (smaller_hole, 0);
+       z10 = whatever [z2r, z1r] + (smaller_hole , 0);
 
+       
 
        z4 = (3/8 staff_space, staff_space/2) + center;
        penpos4(whatever, 53);
@@ -207,26 +224,23 @@ def draw_meta_flat(expr xcenter, w, crook_fatness) =
        save ne_angle;
        ne_angle = angle(z9 - z8);
 
-       z7 = 8/33 [z8,z9];
+       z7 = 8/33 [z8,z9] + (1.0 smaller_hole, 0);
        z6l = 18/33 [z8,z9] + .5 crook_thinness *dir(ne_angle -90);
   
        penpos7(crook_thinness, ne_angle + 90);
 
        z6r = .3 (z9-z8) + z7r;
 
-%      penpos7(crook_thinness, angle(dir(z8-center) -180);
-
        penpos8(whatever, ne_angle + 90);
        x8r =  xpart center - bottom_stem_thick/2;
        penlabels(range 0 thru 10);
 
        y10 = -1/5 staff_space;
-       z10 = whatever [z2r, z1r];
 
        unfill z3r .. z4r{right} .. tension .9 
                .. z6r ---
-               z7r{left}
-               .. z10  -- cycle;
+               z7r{left} 
+               .. z10{z3r-z10}  -- cycle;
        fill z8r{down}
                .. tension 0.8 ..z8l{(z9-z8)}
                .. z7l
@@ -242,8 +256,8 @@ enddef;
 % unfortunately, 600dpi is not enough to show the brush of the stem.
 %
 fet_beginchar("Flat", "-1", "flat")
-       set_char_box(1.2 stafflinethickness#, .8 staff_space#, .5 staff_space#, 2 staff_space#);
-       draw_meta_flat(0, w, 1/3 staff_space);
+       set_char_box(1.2 stafflinethickness#, .8 staff_space#, 0.6 staff_space#, 1.9 staff_space#);
+       draw_meta_flat(0, w, 0.31 staff_space);
        fet_endchar;
 
 
@@ -252,10 +266,10 @@ fet_beginchar("Double Flat", "-2", "flatflat")
        left_wid = .7;
        right_wid = .8;
        overlap = .05;
-       set_char_box(1.2 stafflinethickness#, (left_wid + right_wid -overlap) *staff_space#, .5 staff_space#, 2 staff_space#);
+       set_char_box(1.2 stafflinethickness#, (left_wid + right_wid -overlap) *staff_space#, .6 staff_space#, 1.9 staff_space#);
        draw_meta_flat(0, left_wid*  staff_space, 1/3 staff_space);
        draw_meta_flat((left_wid - overlap) *staff_space,  
-               right_wid *staff_space, 1/3 staff_space);
+               right_wid *staff_space, 0.33 staff_space);
        fet_endchar;
 
 fet_beginchar("Double Sharp", "2", "sharpsharp")
@@ -308,11 +322,11 @@ def draw_paren =
        .. simple_serif(z1r, z1l, 90) .. z2l{down} -- cycle;
 enddef;
   
-fet_beginchar("Right Parenthesis", ")", "rightparen")
+fet_beginchar("Right Parenthesis", "rightparen", "rightparen")
        draw_paren;
 fet_endchar;
 
-fet_beginchar("Left Parenthesis", "(", "leftparen")
+fet_beginchar("Left Parenthesis", "leftparen", "leftparen")
        draw_paren;
         currentpicture := currentpicture xscaled -1;
         set_char_box(charwd, charbp, chardp, charht);