X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2Ffeta-rests.mf;h=675980fe09435d534079c9a46468c002100378ff;hb=a6a51abfd0195a3cf7d6ea095cf69808852f21ce;hp=1e416d36d37f8b40a861dd72c39ef523afba3a95;hpb=54b02666750062788185bd3f99e644d621e348c2;p=lilypond.git diff --git a/mf/feta-rests.mf b/mf/feta-rests.mf index 1e416d36d3..675980fe09 100644 --- a/mf/feta-rests.mf +++ b/mf/feta-rests.mf @@ -1,12 +1,12 @@ % Feta (not the Font-En-Tja) music font -- rest symbols -*-Fundamental-*- % This file is part of LilyPond, the GNU music typesetter. % -% Copyright (C) 1997--2011 Jan Nieuwenhuizen +% Copyright (C) 1997--2015 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 @@ -43,7 +43,7 @@ fet_beginchar ("whole rest", "0"); currentpicture := currentpicture shifted (0, -block_rest_y + feta_space_shift); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -52,7 +52,7 @@ fet_beginchar ("half rest", "1"); block_rest; - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -72,8 +72,6 @@ fet_beginchar ("whole rest (outside staff)", "0o"); lft x5 = -b - block_rest_y; rt x6 = w + block_rest_y; draw_gridline (z5, z6, ledgerlinethickness_rounded); - - draw_staff (-2, 2, -3); fet_endchar; @@ -90,8 +88,6 @@ fet_beginchar ("half rest (outside staff)", "1o"); rt x6 = w + block_rest_y; draw_gridline (z5, z6, ledgerlinethickness_rounded); - - draw_staff (-2, 2, 3); fet_endchar; @@ -103,7 +99,7 @@ fet_beginchar ("maxima rest", "M3"); addto currentpicture also currentpicture shifted (2 breve_rest_x, 0); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -113,7 +109,7 @@ fet_beginchar ("longa rest", "M2"); draw_block ((0, -breve_rest_y + feta_shift), (breve_rest_x, breve_rest_y)); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -122,7 +118,7 @@ fet_beginchar ("breve rest", "M1"); draw_block ((0, 0), (breve_rest_x, breve_rest_y)); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; fet_beginchar ("breve rest (outside staff)", "M1o"); @@ -139,8 +135,6 @@ fet_beginchar ("breve rest (outside staff)", "M1o"); draw_gridline (z5, z6, ledgerlinethickness_rounded); draw_gridline ((x5, 0), (x6, 0), ledgerlinethickness_rounded); - - draw_staff (-2, 2, 3); fet_endchar; @@ -226,7 +220,7 @@ fet_beginchar ("Quarter rest", "2"); penlabels (1, 2, 3, 4, 5, 6, 7); penlabels (10, 11, 12, 13); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -374,7 +368,7 @@ def draw_eighth_rest (expr show_labels) = -- z1l .. cycle; - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); enddef; @@ -384,6 +378,72 @@ fet_beginchar ("Classical quarter rest", "2classical"); fet_endchar; +fet_beginchar ("Z-shaped quarter rest", "2z"); + save ycenter; + save pat, bulb, rest; + path pat, bulb, rest; + show_labels := 0; + + set_char_box (0, 1.125 staff_space#, + 0.5 staff_space# + bulb_diam# / 2, + 0.5 staff_space# + bulb_diam# / 2); + + % The brushes on other rests taper from thin to thick, + % but because this rest has a bulb on both ends, use + % a constant thickness somewhere in between. + slash_thickness := (7 thin + 3 thick) / 10; + + x1 = 0 + hround 0.5 slash_thickness; + y1 = -(d - vround 0.5 slash_thickness); + x2 = w - hround 0.5 slash_thickness; + y2 = h - vround 0.5 slash_thickness; + + penpos1 (slash_thickness, angle(z2 - z1) - 90); + penpos2 (slash_thickness, angle(z2 - z1) - 90); + + z9 = z2 + 0.5 slash_thickness * dir (angle (z2 - z1)); + z12 = z1 + 0.5 slash_thickness * dir (angle (z1 - z2)); + y9 := vround y9; + + x1l := hround x1l; + x1r := hround x1r; + x1 := .5 [x1l, x1r]; + + x2l := hround x2l; + x2r := hround x2r; + x2 := .5 [x2l, x2r]; + + if show_labels = 1: + penlabels (1, 2); + labels (9, 12); + fi; + + pat = z1l + -- z2l + .. z9 + .. z2r + -- z1r + .. cycle; + bulb = draw_rest_bulb (0.5 staff_space, y2r, pat, 1.0, show_labels); + + rest = z12 + .. bulb rotatedaround ((0.5 w, 0), 180) + -- z2r + .. z9 + .. bulb + -- z1l + .. cycle; + + if show_labels = 0: + rest := rest xscaled -1 shifted (w, 0); + fi; + + fill rest; + + draw_staff_if_debugging (-2, 2); +fet_endchar; + + fet_beginchar ("8th rest", "3"); draw_eighth_rest (1); fet_endchar; @@ -440,7 +500,7 @@ fet_beginchar ("16th rest", "4"); penlabels (1, 2); labels (9); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -494,7 +554,7 @@ fet_beginchar ("32th rest", "5"); penlabels (1, 2); labels (9); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -552,7 +612,7 @@ fet_beginchar ("64th rest", "6"); penlabels (1, 2); labels (9); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar; @@ -614,7 +674,7 @@ fet_beginchar ("128th rest", "7"); penlabels (1, 2); labels (9); - draw_staff (-2, 2, 0); + draw_staff_if_debugging (-2, 2); fet_endchar;