X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2Ffeta-accordion.mf;h=fa89b2f6826b124b317a426f2b4e8dd190bc371e;hb=b463b94357a22828d7e5e6e8d555900805767df0;hp=e362826faa62eafc64b9aa7bc8b1e6ca6141f5e2;hpb=f423fa364db4d816ee207a675fd1c0d7ef26cd22;p=lilypond.git diff --git a/mf/feta-accordion.mf b/mf/feta-accordion.mf index e362826faa..fa89b2f682 100644 --- a/mf/feta-accordion.mf +++ b/mf/feta-accordion.mf @@ -1,8 +1,23 @@ -% -*- Fundamental -*- +% Feta (not the Font-En-Tja) music font -- draw accordion symbols +% This file is part of LilyPond, the GNU music typesetter. +% +% Copyright (C) 1998--2010 Han-Wen Nienhuys +% +% LilyPond 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. +% +% LilyPond is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with LilyPond. If not, see . fet_begingroup ("accordion"); - % % These dimensions are the same for all register symbols. % The different symbols should calculate their other dimensions from them. @@ -16,8 +31,8 @@ define_pixels (accreg_dot_size, accreg_linethickness, accreg_lh); fet_beginchar ("accDiscant", "accDiscant") - save r, p, lh, lt; - path p; + save r, pat, lh, lt; + path pat; r# = 3/2 accreg_lh#; define_pixels (r); @@ -47,11 +62,16 @@ fet_beginchar ("accDiscant", "accDiscant") % mf doesn't handle pixel dropouts in outline objects, so we use % `draw' if not called by mpost if known miterlimit: - penstroke z1e - .. z2e - .. z3e - .. z4e - .. cycle; + fill z1r + .. z2r + .. z3r + .. z4r + .. cycle; + unfill z1l + .. z2l + .. z3l + .. z4l + .. cycle; else: pickup pencircle xscaled accreg_linethickness yscaled lt; draw z1 @@ -61,15 +81,15 @@ fet_beginchar ("accDiscant", "accDiscant") .. cycle; fi; - p := z4{right} - .. z1{up} - .. {left}z2; + pat := z4{right} + .. z1{up} + .. {left}z2; pickup penrazor scaled lt rotated 90; - top z5 = p intersectionpoint ((0, lh + lt) -- (w, lh + lt)); + top z5 = pat intersectionpoint ((0, lh + lt) -- (w, lh + lt)); z6 = z5 xscaled -1; - bot z7 = p intersectionpoint ((0, 2 lh) -- (w, 2 lh)); + bot z7 = pat intersectionpoint ((0, 2 lh) -- (w, 2 lh)); z8 = z7 xscaled -1; labels (5, 6, 7, 8); @@ -95,8 +115,7 @@ fet_endchar; fet_beginchar ("accFreebase", "accFreebase") - save r, p, lh, lt; - path p; + save r, lh, lt; r# = accreg_lh#; define_pixels (r); @@ -126,11 +145,16 @@ fet_beginchar ("accFreebase", "accFreebase") % mf doesn't handle pixel dropouts in outline objects, so we use % `draw' if not called by mpost if known miterlimit: - penstroke z1e - .. z2e - .. z3e - .. z4e - .. cycle; + fill z1r + .. z2r + .. z3r + .. z4r + .. cycle; + unfill z1l + .. z2l + .. z3l + .. z4l + .. cycle; else: pickup pencircle xscaled accreg_linethickness yscaled lt; draw z1 @@ -149,7 +173,7 @@ fet_endchar; fet_beginchar ("accStdbase", "accStdbase") save r, p, lh, lt; - path p; + path pat; r# = 2 accreg_lh#; define_pixels (r); @@ -179,11 +203,16 @@ fet_beginchar ("accStdbase", "accStdbase") % mf doesn't handle pixel dropouts in outline objects, so we use % `draw' if not called by mpost if known miterlimit: - penstroke z1e - .. z2e - .. z3e - .. z4e - .. cycle; + fill z1r + .. z2r + .. z3r + .. z4r + .. cycle; + unfill z1l + .. z2l + .. z3l + .. z4l + .. cycle; else: pickup pencircle xscaled accreg_linethickness yscaled lt; draw z1 @@ -193,15 +222,15 @@ fet_beginchar ("accStdbase", "accStdbase") .. cycle; fi; - p := z4{right} - .. z1{up} - .. {left}z2; + pat := z4{right} + .. z1{up} + .. {left}z2; pickup penrazor scaled lt rotated 90; - top z5 = p intersectionpoint ((0, lh + lt) -- (w, lh + lt)); + top z5 = pat intersectionpoint ((0, lh + lt) -- (w, lh + lt)); z6 = z5 xscaled -1; - bot z7 = p intersectionpoint ((0, 3 lh) -- (w, 3 lh)); + bot z7 = pat intersectionpoint ((0, 3 lh) -- (w, 3 lh)); z8 = z7 xscaled -1; labels (5, 6, 7, 8); @@ -359,17 +388,21 @@ fet_beginchar ("accOldEE", "accOldEE") z1 = (0, 0); z2 = (0, ir); + z3 = (0, -ir); penpos1 (blot_diameter, 0); penpos2 (stroke_width + blot_diameter, 0); + penpos3 (stroke_width + blot_diameter, 0); pickup pencircle scaled (lr + blot_diameter); - for pp := 0 step 45 until 360: - drawdot (0, 0) shifted (ir * (dir pp)); + for pp := 0 step 45 until 135: + drawdot z2 rotated pp; + drawdot z3 rotated pp; - penstroke (z1e - -- z2e) rotated pp; + penstroke (z2e + -- z1e + -- z3e) rotated pp; endfor; pickup pencircle scaled lr; @@ -384,35 +417,39 @@ fet_beginchar ("accOldEE", "accOldEE") h := lh + lt; b := w := (lh + hround accreg_linethickness) / 2; - penpos3 (hround accreg_linethickness, 0); - penpos4 (lt, 90); - penpos5 (hround accreg_linethickness, 180); - penpos6 (lt, 270); + penpos10 (hround accreg_linethickness, 0); + penpos11 (lt, 90); + penpos12 (hround accreg_linethickness, 180); + penpos13 (lt, 270); - z3r = (w, h / 2); - z4r = (0, h); - z5r = (-b, h / 2); - z6r = (0, 0); + z10r = (w, h / 2); + z11r = (0, h); + z12r = (-b, h / 2); + z13r = (0, 0); - % penlabels (1, 2, 3, 4, 5, 6); + % penlabels (1, 2, 10, 11, 12, 13); % mf doesn't handle pixel dropouts in outline objects, so we use % `draw' if not called by mpost if known miterlimit: - penstroke z3e - .. z4e - .. z5e - .. z6e - .. cycle; + fill z10r + .. z11r + .. z12r + .. z13r + .. cycle; + unfill z10l + .. z11l + .. z12l + .. z13l + .. cycle; else: pickup pencircle xscaled accreg_linethickness yscaled lt; - draw z3 - .. z4 - .. z5 - .. z6 + draw z10 + .. z11 + .. z12 + .. z13 .. cycle; fi; - fet_endchar;