From: wl Date: Sun, 13 Nov 2005 06:09:27 +0000 (+0000) Subject: * mf/feta-arrow.mf: For all glyphs, don't mirror `currentpicture' X-Git-Tag: release/2.7.20~65 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e6383f289878f540c3bb70f2f36ae1390ce3da6d;p=lilypond.git * mf/feta-arrow.mf: For all glyphs, don't mirror `currentpicture' but the affected path. This ensures that the (overlapping) outlines have the same direction, which is a necessary prerequisite for FontForge's algorithm to remove overlaps. Formatting. --- diff --git a/ChangeLog b/ChangeLog index 9908496107..484782aff7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-11-13 Werner Lemberg + + * mf/feta-arrow.mf: For all glyphs, don't mirror `currentpicture' + but the affected path. This ensures that the (overlapping) outlines + have the same direction, which is a necessary prerequisite for + FontForge's algorithm to remove overlaps. + Formatting. + 2005-11-13 Han-Wen Nienhuys * lily/tie-column-format.cc (set_chord_outline): add dots into diff --git a/mf/feta-arrow.mf b/mf/feta-arrow.mf index 2133446ac8..f44ebb6aeb 100644 --- a/mf/feta-arrow.mf +++ b/mf/feta-arrow.mf @@ -4,31 +4,30 @@ % source file of the GNU LilyPond music typesetter % % (c) 2005 Han-Wen Nienhuys -% - - fet_begingroup ("arrowheads"); % -% To consider: we could put arrow heads at their real Unicode locations. -% +% To consider: we could put arrow heads at their real Unicode locations. +% % -% Setup paths for upper half of arrow head pointing right. -% CLOSE_PATH is for a closed arrow, OPEN_PATH is for the open arrow -% OPEN_TENSION sets the tension for the part which forms the path in OPEN_PATH -% +% Set up paths for upper half of arrow head pointing right. +% CLOSE_PATH is for a closed arrow, OPEN_PATH is for the open arrow. +% OPEN_TENSION sets the tension for the part which forms the path in +% OPEN_PATH. +% + def set_arrow_paths (expr width, height, open_tension, arrowlinethickness) = - save pat, finalpath, - tip_angle_o, tip_angle_c, tip_dir_c, tip_dir_o, - indent; + save pat, finalpath; + save tip_angle_o, tip_angle_c, tip_dir_c, tip_dir_o; + save indent; path pat, open_path, close_path; pair tip_dir_o, tip_dir_c; pickup pencircle scaled arrowlinethickness; - indent = linethickness/2; + indent = linethickness / 2; lft x1 = -width; x2 = 0; @@ -39,8 +38,8 @@ def set_arrow_paths (expr width, height, open_tension, arrowlinethickness) = y5 = 0; x5 = x4 + indent; - pat := z1 .. tension open_tension .. z2{right}; - + pat := z1 + ..tension open_tension.. z2{right}; penpos2 (arrowlinethickness, 90); tip_dir_o := direction 0.0 of pat; tip_angle_o := angle (tip_dir_o); @@ -48,10 +47,15 @@ def set_arrow_paths (expr width, height, open_tension, arrowlinethickness) = z3 = z1; penpos3 (arrowlinethickness, tip_angle_o); - open_path := z1r{tip_dir_o} .. z2r{right} - .. z2l{left} .. z1l{-tip_dir_o} .. z3l .. cycle; + open_path := z1r{tip_dir_o} + .. z2r{right} + .. z2l{left} + .. z1l{-tip_dir_o} + .. z3l + .. cycle; - pat := z4 .. z5{down}; + pat := z4 + .. z5{down}; tip_dir_c := direction 0.0 of pat; tip_angle_c := angle (tip_dir_c); penpos4 (arrowlinethickness, 90+ tip_angle_c); @@ -59,82 +63,105 @@ def set_arrow_paths (expr width, height, open_tension, arrowlinethickness) = z6 = z5; penpos6 (arrowlinethickness, 90); - close_path := z4l{tip_dir_c} .. z5l{down} .. z6l{right} - .. z2l{right} .. z2r{left} - .. tension open_tension - .. z1r{-tip_dir_o} - .. z3l - .. cycle; - + close_path := z4l{tip_dir_c} + .. z5l{down} + .. z6l{right} + .. z2l{right} + .. z2r{left} + ..tension open_tension.. z1r{-tip_dir_o} + .. z3l + .. cycle; enddef; + fet_beginchar ("open", "open.01"); - set_char_box (staff_space#, 1.6 linethickness#/2, 0.5 staff_space#, 0.5 staff_space#); - set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness); - fill open_path; - addto currentpicture also currentpicture yscaled -1; + set_char_box (staff_space#, 1.6 linethickness# / 2, + 0.5 staff_space#, 0.5 staff_space#); + set_arrow_paths (staff_space, 0.5 staff_space, + 1.0, 1.6 linethickness); + fill open_path; + open_path := open_path yscaled -1; + fill open_path; + penlabels (1, 2, 3); penlabels (4, 5, 6); fet_endchar; + fet_beginchar ("open", "open.0M1"); - set_char_box ( 1.6 linethickness#/2, staff_space#, 0.5 staff_space#, 0.5 staff_space#); - set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness); - fill open_path; - addto currentpicture also currentpicture yscaled -1; + set_char_box (1.6 linethickness# / 2, staff_space#, + 0.5 staff_space#, 0.5 staff_space#); + set_arrow_paths (staff_space, 0.5 staff_space, + 1.0, 1.6 linethickness); + fill open_path; + open_path := open_path yscaled -1; + fill open_path; currentpicture := currentpicture xscaled -1; fet_endchar; + fet_beginchar ("open", "open.11"); set_char_box (.5 staff_space#, .5 staff_space#, - 1.0 staff_space#, 1.6 linethickness#/2); - set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness); - fill open_path; - addto currentpicture also currentpicture yscaled -1; + 1.0 staff_space#, 1.6 linethickness# / 2); + set_arrow_paths (staff_space, 0.5 staff_space, + 1.0, 1.6 linethickness); + fill open_path; + open_path := open_path yscaled -1; + fill open_path; currentpicture := currentpicture rotated 90; fet_endchar; + fet_beginchar ("open", "open.1M1"); set_char_box (.5 staff_space#, .5 staff_space#, - 1.6 linethickness#/2, 1.0 staff_space#); - set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness); - fill open_path; - addto currentpicture also currentpicture yscaled -1; + 1.6 linethickness# / 2, 1.0 staff_space#); + set_arrow_paths (staff_space, 0.5 staff_space, + 1.0, 1.6 linethickness); + fill open_path; + open_path := open_path yscaled -1; + fill open_path; currentpicture := currentpicture rotated 90; currentpicture := currentpicture yscaled -1; fet_endchar; - fet_beginchar ("close", "close.01"); set_char_box (staff_space#, 0, 0.5 staff_space#, 0.5 staff_space#); set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter); - fill close_path; - addto currentpicture also currentpicture yscaled -1; + fill close_path; + close_path := close_path yscaled -1; + fill close_path; fet_endchar; + + fet_beginchar ("close", "close.0M1"); set_char_box (0, staff_space#, 0.5 staff_space#, 0.5 staff_space#); set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter); - fill close_path; - addto currentpicture also currentpicture yscaled -1; + fill close_path; + close_path := close_path yscaled -1; + fill close_path; currentpicture := currentpicture xscaled -1; fet_endchar; + fet_beginchar ("close", "close.11"); set_char_box (.5 staff_space#, .5 staff_space# , - 1.0 staff_space#, 0.0 staff_space#); + 1.0 staff_space#, 0.0 staff_space#); set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter); - fill close_path; - addto currentpicture also currentpicture yscaled -1; + fill close_path; + close_path := close_path yscaled -1; + fill close_path; currentpicture := currentpicture rotated 90; fet_endchar; + fet_beginchar ("close", "close.1M1"); set_char_box (.5 staff_space#, .5 staff_space# , - 0.0 staff_space#, 1.0 staff_space#); + 0.0 staff_space#, 1.0 staff_space#); set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter); - fill close_path; - addto currentpicture also currentpicture yscaled -1; + fill close_path; + close_path := close_path yscaled -1; + fill close_path; currentpicture := currentpicture rotated -90; fet_endchar;