]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-banier.mf
release: 1.3.123
[lilypond.git] / mf / feta-banier.mf
index 46cb11b300268bc0db143c5770b169dca2e56055..4795c825136d6c92c42c415bd617506203971a5c 100644 (file)
@@ -10,14 +10,17 @@ path outer_path;
 upflag_width# = .750 black_notehead_width# + stemthickness#/2;
 downflag_width# = .833 black_notehead_width# + stemthickness#/2;
 
+right_upflag_space# = .2 upflag_width#;
+right_downflag_space# = .2 downflag_width#;
+
 %
 % Flags pointing down cannot overlap with the notehead in y-direction,
 % so they have less slant.
 
-%
-% Because of optical illusion, the utmost flag 
-% (bottom for down-pointing, top  
-% for up-pointing) should be smaller than the other flags 
+% Because of optical illusion, the utmost flag (bottom for
+% down-pointing, top for up-pointing) should be smaller than the other
+% flags.  Adobe Sonata doesn't do this correctly.  (Instead they have
+% an extension flag, which looks less elegant)
 %
 
 save hip_thickness, foot_thickness;
@@ -29,7 +32,6 @@ foot_thickness# =  hip_thickness#;
 % for example, see POSTSCRIPT Language -- program design, 
 % page 119, and [Wanske], p 41,42
 %
-
 def draw_flag(expr center, flare, 
        dims, hip_depth, foot_wid, hip_thickness, foot_thickness)=
        clearxy;
@@ -96,15 +98,15 @@ fet_beginchar("8th Flag (up)", "u3", "eighthflag")
                hip_depth_ratio, hip_width,
                foot_depth, foot_width_ratio;
 
-       flare# = 1.0 interline#;
+       flare# = 1.0 staff_space#;
        hip_depth_ratio = .72; 
        foot_width_ratio = .8;
        hip_width# = upflag_width# - hip_thickness#/2;
 
-       foot_depth# =  3 interline#;
+       foot_depth# =  3 staff_space#;
 
        set_char_box(stemthickness# /2, hip_width# 
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_upflag_space#
                 foot_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -114,7 +116,7 @@ fet_beginchar("8th Flag (up)", "u3", "eighthflag")
                hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness);
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
 fet_endchar;
 
 fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
@@ -122,10 +124,10 @@ fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
                hip_depth_ratio, hip_width,
                foot_depth, foot_width_ratio;
        save flagspace, total_depth, flag_count;
-       total_depth# = 3.5 interline#;
+       total_depth# = 3.5 staff_space#;
        flag_count = 2;
-       flare# = .85 interline#;
-       flagspace# = .85 interline#;    
+       flare# = .85 staff_space#;
+       flagspace# = .85 staff_space#;  
        hip_depth_ratio = .72 ;
        hip_width# = upflag_width# - hip_thickness#/2;
        flagspace# + foot_depth# = total_depth#;
@@ -133,13 +135,12 @@ fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
        foot_width_ratio = .8;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_upflag_space#
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
                flagspace,
                foot_depth,  foot_thickness);
-
        draw_flag((stemthickness/2,- flagspace), flare, 
                (hip_width, foot_depth), 
                hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
@@ -148,7 +149,7 @@ fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
                .97, 1.00, 1.25, hip_thickness, foot_thickness);  
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
 fet_endchar;
 
 
@@ -158,9 +159,9 @@ fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
                foot_depth, foot_width_ratio;
        save flagspace, total_depth, flag_count;
        flag_count = 3;
-       total_depth#=4.25 interline#;
-       flare# = .85 interline#;
-       flagspace# = .87 interline#;    
+       total_depth#=4.25 staff_space#;
+       flare# = .85 staff_space#;
+       flagspace# = .87 staff_space#;  
        hip_depth_ratio = .72 ;
        hip_width# = upflag_width# - hip_thickness#/2;
        (flag_count-1) * flagspace# + foot_depth# = total_depth#;
@@ -168,7 +169,7 @@ fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
        foot_width_ratio = .8;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_upflag_space#
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -186,7 +187,7 @@ fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
                .95, 1.05, 1.25, hip_thickness, foot_thickness);  
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
 fet_endchar;
 
 fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
@@ -196,17 +197,17 @@ fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
        save flagspace, total_depth, flag_count;
        
        flag_count = 4;
-       flare# = .85 interline#;
-       flagspace# = .9 interline#;     
+       flare# = .85 staff_space#;
+       flagspace# = .9 staff_space#;   
        hip_depth_ratio = .72 ;
        hip_width# = upflag_width# - hip_thickness#/2;
-       total_depth# = 5.25 interline#;
+       total_depth# = 5.25 staff_space#;
        (flag_count-1) * flagspace# + foot_depth# = total_depth#;
 
        foot_width_ratio = .8;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_upflag_space#
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -225,7 +226,30 @@ fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
        add_flag(flagspace, flare,
                .95, 1.05, 1.25, hip_thickness, foot_thickness);  
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
+fet_endchar;
+
+fet_beginchar("grace dash (up)", "ugrace", "gracedash")
+       save flare, 
+               hip_depth_ratio, hip_width,
+               foot_depth;
+
+       flare# = 1.0 staff_space#;
+       hip_depth_ratio = .72; 
+       hip_width# = upflag_width# - hip_thickness#/2;
+
+       foot_depth# =  3 staff_space#;
+
+       define_pixels(flare, hip_width, hip_thickness,
+               foot_depth, foot_thickness);
+
+       set_char_box(hip_width# * hip_depth_ratio,
+         hip_width# + stemthickness#/2 + right_upflag_space#, 
+         foot_depth# * hip_depth_ratio, -flare#)
+
+       pickup pencircle scaled 1.5 stemthickness;
+       draw (-b ,-d) ..
+         (w, h);
 fet_endchar;
 
 fet_beginchar("8th (down)", "d3", "deighthflag")
@@ -235,17 +259,17 @@ fet_beginchar("8th (down)", "d3", "deighthflag")
        save flagspace, total_depth, flag_count;
        
        flag_count = 1;
-       flare# = .99 interline#;
-       flagspace# = .9 interline#;     
+       flare# = .99 staff_space#;
+       flagspace# = .9 staff_space#;   
        hip_depth_ratio = .72 ;
        hip_width# = downflag_width# - hip_thickness#/2;
-       total_depth# = 2.85 interline#;
+       total_depth# = 2.85 staff_space#;
        (flag_count-1) * flagspace# + foot_depth# = total_depth#;
 
        foot_width_ratio = .8;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2
+               + stemthickness#/2 + right_downflag_space#,
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -258,7 +282,7 @@ fet_beginchar("8th (down)", "d3", "deighthflag")
 
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
        y_mirror_char;
 fet_endchar;
 
@@ -269,17 +293,17 @@ fet_beginchar("16th (down)", "d4", "dsixteenthflag")
        save flagspace, total_depth, flag_count;
        
        flag_count = 2;
-       flare# = .8 interline#;
-       flagspace# = .9 interline#;     
+       flare# = .8 staff_space#;
+       flagspace# = .9 staff_space#;   
        hip_depth_ratio = .85 ;
        hip_width# = downflag_width# - hip_thickness#/2;
-       total_depth# = 3.0 interline#;
+       total_depth# = 3.0 staff_space#;
        (flag_count-1) * flagspace# + foot_depth# = total_depth#;
 
        foot_width_ratio = .95;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_downflag_space#
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -295,7 +319,7 @@ fet_beginchar("16th (down)", "d4", "dsixteenthflag")
        
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
        y_mirror_char;
 fet_endchar;
 
@@ -306,17 +330,17 @@ fet_beginchar("32nd (down)", "d5", "dthirtysecondflag")
        save flagspace, total_depth, flag_count;
        
        flag_count = 3;
-       flare# = .84 interline#;
-       flagspace# = .9 interline#;     
+       flare# = .84 staff_space#;
+       flagspace# = .9 staff_space#;   
        hip_depth_ratio = .85 ;
        hip_width# = downflag_width# - hip_thickness#/2;
-       total_depth# = 3.85 interline#;
+       total_depth# = 3.85 staff_space#;
        (flag_count-1) * flagspace# + foot_depth# = total_depth#;
 
        foot_width_ratio = .95;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_downflag_space#
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -335,7 +359,7 @@ fet_beginchar("32nd (down)", "d5", "dthirtysecondflag")
        
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
        y_mirror_char;
 fet_endchar;
 fet_beginchar("64th (down)", "d6", "dsixtyfourthflag")
@@ -345,17 +369,17 @@ fet_beginchar("64th (down)", "d6", "dsixtyfourthflag")
        save flagspace, total_depth, flag_count;
        
        flag_count = 4;
-       flare# = .8 interline#;
-       flagspace# = .9 interline#;     
+       flare# = .8 staff_space#;
+       flagspace# = .9 staff_space#;   
        hip_depth_ratio = .85 ;
        hip_width# = downflag_width# - hip_thickness#/2;
-       total_depth# = 4.35 interline#;
+       total_depth# = 4.35 staff_space#;
        (flag_count-1) * flagspace# + foot_depth# = total_depth#;
 
        foot_width_ratio = .98;
 
        set_char_box(stemthickness# /2, hip_width#
-               + stemthickness#/2, 
+               + stemthickness#/2 + right_downflag_space#
                total_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
@@ -376,7 +400,56 @@ fet_beginchar("64th (down)", "d6", "dsixtyfourthflag")
        
 
        pickup pencircle scaled stemthickness;
-       draw (0, 0) .. (0,-2 interline);
+       draw (0, 0) .. (0,-2 staff_space);
        y_mirror_char;
 fet_endchar;
+
+
+fet_beginchar("grace dash (down)", "dgrace", "dgracedash")
+       save flare, hip_depth_ratio, hip_width, foot_depth;
+       save flagspace, total_depth, flag_count;
+       
+       flag_count = 1;
+       flare# = .99 staff_space#;
+       flagspace# = .9 staff_space#;   
+       hip_depth_ratio = .72 ;
+       hip_width# = downflag_width# - hip_thickness#/2;
+       total_depth# = 2.85 staff_space#;
+       (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+       foot_width_ratio = .8;
+
+       define_pixels(flare, hip_width, hip_thickness,
+               flagspace, foot_depth);
+
+       set_char_box(hip_width# * hip_depth_ratio,
+         hip_width# + stemthickness#/2 + right_downflag_space#,
+         foot_depth# * hip_depth_ratio, -flare#)
+
+       pickup pencircle scaled 1.5 stemthickness;
+       draw (-b, -d) .. (w,h);
+       y_mirror_char;
+fet_endchar;
+
+% ustem?
+%
+%
+% Stem characters so we can compose metronome markings with Feta
+% entirely.
+%
+
+fet_beginchar("stem (up)", "stem", "stem")
+       set_char_box(stemthickness#/2, stemthickness#/2, 0, 3.5staff_space#);
+       pickup pencircle scaled stemthickness;
+       draw (0, 0.2staff_space) .. (0, 3.5staff_space);
+fet_endchar;
+
+% do we want this?
+fet_beginchar("stem (down)", "dstem", "dstem")
+       set_char_box(stemthickness#/2, stemthickness#/2, 3.5staff_space#, 0);
+       pickup pencircle scaled stemthickness;
+       draw (0, -0.2staff_space) .. (0, -3.5staff_space);
+fet_endchar;
+
+
 fet_endgroup("flags");