]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-beugel.mf
* buildscripts/lilypond-words.py: search words also from
[lilypond.git] / mf / feta-beugel.mf
index ef2cd25f2cab3a871fc8be5259f08a3185399058..3d6f6b037023f652a207ca6bd53821b0601d0adf 100644 (file)
@@ -1,15 +1,12 @@
+
+
 input feta-autometric;
 input feta-macros;
-input feta-params;
 
-font_coding_scheme "feta braces";
-
-fet_beginfont("feta-braces", font_count);
-mode_setup;
+staffsize#  := 20 pt#;  %% arbitrary.
 
 
-save code;
-code := -1;
+input feta-params;
 
 
 def abc_encode_int (expr i) =
@@ -20,6 +17,20 @@ def abc_encode_int (expr i) =
        fi
 enddef ;
 
+% we must let the design increase for each
+% font to make sure that mftrace doesn't jack up the resolution too highly
+% for the longer braces.
+fet_beginfont("feta-braces-" &char(97 + font_count), (font_count + 1)* 15,
+               "fetaBraces");
+
+mode_setup;
+
+
+
+save code;
+code := -1;
+
+
 def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
 
        save pendir, height, width, thin, thick, slt;
@@ -64,7 +75,7 @@ enddef;
 save stafflinethickness;
 save increment;
 
-stafflinethickness := 0.5pt#;
+linethickness := 0.5pt#;
 increment := 0.5pt#;
 y := 10pt#;
 
@@ -79,7 +90,12 @@ for i := 0 step 1 until font_count:
     % message "l: "&decimal l;
     % note: define_pixels (x) multiplies x by hppp,
     % must never get bigger than infinity
-    y := min (y + increment, infinity/hppp - 1);
+    y := y + increment;
+
+    if y > infinity/hppp:
+      message "Resolution and/or magnification is too high";
+      error please report: <bug-lilypond@gnu.org>;
+    fi
 
     % x should be about one staff space, taking brace to have
     % default height of 3 staffs, this yields height / 3 / 4 = 12
@@ -87,9 +103,9 @@ for i := 0 step 1 until font_count:
     x := y / 15;
 
     increment := x / 10;
-    stafflinethickness :=  min (0.5pt#, y/150);
+    linethickness :=  min (0.5pt#, y/150);
     if i = font_count:
-      draw_brace (y, x, stafflinethickness);
+      draw_brace (y, x, linethickness);
     fi
   endfor;
 endfor