]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/feta-bolletjes.mf (overdone_heads): solfa_noteheight, a
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 28 Jan 2006 00:51:29 +0000 (00:51 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 28 Jan 2006 00:51:29 +0000 (00:51 +0000)
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
lily/note-collision.cc
mf/feta-bolletjes.mf

index ed29d797f4cedb0f2461821c8307ccceda1aad7a..de20e1879cb70cad308b648ba23da9591ea15ded 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-01-28  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * 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.
index 99be0410ddc040a23e41270a4b6d7922377a720b..284810d6eca4365189f81b33b4fb910b37a859d4 100644 (file)
@@ -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.  */
index 0eb46ae98cfa36dd8a9ccb8c1a240b7260b04274..8a1bd2883bb5208dea16ef68cd576365a649f863 100644 (file)
@@ -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;