X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2Ffeta-braces.mf;h=c948f345fd6e525fa0d221606b96a55f86dc99e9;hb=0840d13e6d695215b1c353c35eaf32bfd78b3709;hp=6f46a7a0fbc02ff1530da8a74040df88c94a6e1a;hpb=bc95f4434f760d41191341ab4508b2064eb19025;p=lilypond.git diff --git a/mf/feta-braces.mf b/mf/feta-braces.mf index 6f46a7a0fb..c948f345fd 100644 --- a/mf/feta-braces.mf +++ b/mf/feta-braces.mf @@ -1,13 +1,13 @@ % Feta (not the Font-En-Tja) music font -- Staff braces % This file is part of LilyPond, the GNU music typesetter. % -% Copyright (C) 1997--2010 Han-Wen Nienhuys +% Copyright (C) 1997--2012 Han-Wen Nienhuys % Jan Nieuwenhuizen % -% LilyPond is free software: you can redistribute it and/or modify +% The LilyPond font 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 3 of the License, or -% (at your option) any later version. +% (at your option) any later version, or under the SIL Open Font License. % % LilyPond is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -90,11 +90,11 @@ def draw_brace (expr height_sharp, width_sharp, slt_sharp, brace_number) = y0 = y1; x0 = x1 - 2/6 thin; - pendir = unitvector (x3 - x1, y3l / 6 - y1); + pendir = unitvector (x3 - x1, y3l / 8 - y1); penangle = angle pendir - 90; penpos3 (thin, penangle); penpos2 (thick, angle (z3 - z1) - 90); - penpos1 (2/3 thin, penangle); + penpos1 (-2 * (x0 - x1), penangle); penlabels (1, 2, 3); labels (0); @@ -116,11 +116,21 @@ def draw_brace (expr height_sharp, width_sharp, slt_sharp, brace_number) = enddef; -save stafflinethickness; +save linethickness; save increment; +save last_brace_number; +save min_width; +save max_width; +save min_thin; +save max_thin; linethickness := 0.5 pt#; increment := 0.5 pt#; +last_brace_number := braces_per_font * 9 - 1; +min_width := 2 pt#; +max_width := 20 pt#; +min_thin := 0.2 pt#; +max_thin := 1.25 pt#; y := 10 pt#; for i := 0 step 1 until font_count: @@ -139,13 +149,10 @@ for i := 0 step 1 until font_count: errmessage "please report to "; fi; - % x should be about one staff space, taking brace to have - % default height of 3 staffs, this yields height / 3 / 4 = 12 - % but 15 looks better - x := y / 15; + x := (y / last_brace_number) [min_width, max_width]; increment := x / 10; - linethickness := min (0.5 pt#, y / 150); + linethickness := (y / last_brace_number) [min_thin, max_thin]; if i = font_count: draw_brace (y, x, linethickness, number); fi;