From 48278f230758b09fc6f6a9cafefbb06f579ee5ab Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 28 Jan 2006 00:51:29 +0000 Subject: [PATCH] * mf/feta-bolletjes.mf (overdone_heads): solfa_noteheight, a little less than noteheight, to prevent overlaps in chords. * lily/note-collision.cc (check_meshing_chords): wipe upper FA head, and fudge stem-attachment. --- ChangeLog | 6 ++++++ lily/note-collision.cc | 13 +++++++++---- mf/feta-bolletjes.mf | 36 +++++++++++++++++++++--------------- 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed29d797f4..de20e1879c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-01-28 Han-Wen Nienhuys + * mf/feta-bolletjes.mf (overdone_heads): solfa_noteheight, a + little less than noteheight, to prevent overlaps in chords. + + * lily/note-collision.cc (check_meshing_chords): wipe upper FA + head, and fudge stem-attachment. + * scm/lily-library.scm (not): define hash-for-each for guile 1.6 * lily/slur-scoring.cc (get_best_curve): handle opt_idx < 0 case. diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 99be0410dd..284810d6ec 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -75,10 +75,15 @@ check_meshing_chords (Grob *me, && !to_boolean (me->get_property ("merge-differently-headed"))) merge_possible = false; - merge_possible = merge_possible && - !(nu->get_property ("style") == ly_symbol2scm ("fa") - && nd->get_property ("style") == ly_symbol2scm ("fa")); - + if (merge_possible + && nu->get_property ("style") == ly_symbol2scm ("fa") + && nd->get_property ("style") == ly_symbol2scm ("fa")) + { + Interval uphead_size = nu->extent (nu, Y_AXIS); + Offset att = Offset (0.0, -1.0); + nu->set_property ("stem-attachment", ly_offset2scm (att)); + nu->set_property ("transparent", SCM_BOOL_T); + } /* Should never merge quarter and half notes, as this would make them indistinguishable. */ diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index 0eb46ae98c..8a1bd2883b 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -26,7 +26,7 @@ picture remember_pic; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% save black_notehead_width, noteheight; -save slash_thick, slash_slope, overdone_heads; +save slash_thick, slash_slope, overdone_heads, solfa_noteheight; numeric black_notehead_width, noteheight, slash_thick; @@ -48,6 +48,12 @@ slash_thick# := 2/3 * 0.48 staff_space#; overdone_heads = 0.0; noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#; + +% +% solfa heads should not overlap on chords. +% +solfa_noteheight# := staff_space# - stafflinethickness#; + define_pixels (slash_thick); define_whole_vertical_pixels (noteheight); @@ -896,8 +902,8 @@ def draw_do_head (expr width_factor, dir) = path p_in, p_out; pair left_dist, right_dist; - set_char_box (0, width_factor * noteheight#, - 0.5 noteheight#, 0.5 noteheight#); + set_char_box (0, width_factor * solfa_noteheight#, + 0.5 solfa_noteheight#, 0.5 solfa_noteheight#); pickup pencircle scaled solfa_pen_thick; @@ -986,8 +992,8 @@ def draw_re_head (expr width_factor, dir) = save p_in, p_out; path p_in, p_out; - set_char_box (0, width_factor * noteheight#, - 0.5 noteheight#, 0.5 noteheight#); + set_char_box (0, width_factor * solfa_noteheight#, + 0.5 solfa_noteheight#, 0.5 solfa_noteheight#); pickup pencircle scaled solfa_pen_thick; @@ -1070,8 +1076,8 @@ def draw_mi_head (expr width_factor) = path path_out, path_in; pair ne_dist, se_dist, ne, se; - set_char_box (0, width_factor * noteheight#, - 0.5 noteheight#, 0.5 noteheight#); + set_char_box (0, width_factor * solfa_noteheight#, + 0.5 solfa_noteheight#, 0.5 solfa_noteheight#); pickup pencircle scaled solfa_pen_thick; @@ -1132,21 +1138,21 @@ fet_endchar; fet_beginchar ("Half mihead", "s1mi"); - draw_mi_head (1.6); + draw_mi_head (solfa_quarter_width); fill path_out; unfill path_in; fet_endchar; fet_beginchar ("Quart mihead", "s2mi"); - draw_mi_head (1.65); + draw_mi_head (solfa_quarter_width); fill path_out; fet_endchar; def draw_fa_head (expr width_factor) = - set_char_box (0, width_factor * noteheight#, - 0.5 noteheight#, 0.5 noteheight#); + set_char_box (0, width_factor * solfa_noteheight#, + 0.5 solfa_noteheight#, 0.5 solfa_noteheight#); save p_down_in, p_down_out, p_up_in, p_up_out, nw_dist, nw; path p_down_in, p_down_out, p_up_in, p_up_out; @@ -1236,8 +1242,8 @@ fet_endchar; def draw_la_head (expr width_factor) = - set_char_box (0, width_factor * noteheight#, - 0.5 noteheight#, 0.5 noteheight#); + set_char_box (0, width_factor * solfa_noteheight#, + 0.5 solfa_noteheight#, 0.5 solfa_noteheight#); save p_in, p_out; path p_in, p_out; @@ -1295,8 +1301,8 @@ fet_endchar; def draw_ti_head (expr width_factor, dir) = - set_char_box (0, width_factor * noteheight#, - 0.5 noteheight#, 0.5 noteheight#); + set_char_box (0, width_factor * solfa_noteheight#, + 0.5 solfa_noteheight#, 0.5 solfa_noteheight#); save p_in, p_out, p_top; save nw_dist, sw_dist, nw, sw; path p_in, p_out, p_top; -- 2.39.2