]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/mensural-ligature-engraver.cc
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / mensural-ligature-engraver.cc
index 45466c10c403ef33e318bff4b58f01a6a03db77d..993e4ff5c97b7b5823941748944a3bd933f2404a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2002--2006 Juergen Reuter <reuter@ipd.uka.de>,
+  (c) 2002--2007 Juergen Reuter <reuter@ipd.uka.de>,
   Pal Benko <benkop@freestart.hu>
 */
 
@@ -35,7 +35,7 @@
  * for example:
  * Ockeghem: Missa Ecce ancilla domini, bassus part, end of Christe.
  *
- * TODO: enhance robustness: in case of an illegal ligature (e.g. the
+ * TODO: enhance robustness: in case of an invalid ligature (e.g. the
  * input specifies a ligature that contains a minima), automatically
  * break the ligature into smaller, valid pieces.  Such a piece may be
  * a single note.
@@ -99,7 +99,7 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
     {
       Grob_info info = primitives[i];
       Item *primitive = dynamic_cast<Item *> (info.grob ());
-      int duration_log = Note_head::get_balltype (primitive);
+      int duration_log = Rhythmic_head::duration_log (primitive);
 
       Stream_event *nr = info.event_cause ();
 
@@ -275,7 +275,7 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
              // instead of number 6
              // the legth of the longa stem should be queried something like
              // Font_interface::get_default_font (ligature)->find_by_name
-             //  ("noteheads.s-2mensural").extent (Y_AXIS).length ()
+             //  ("noteheads.sM2mensural").extent (Y_AXIS).length ()
            }
          prev_primitive->set_property ("join-right-amount",
                                        scm_from_int (delta_pitch));
@@ -313,12 +313,12 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
 
   Real head_width
     = Font_interface::get_default_font (ligature)->
-    find_by_name ("noteheads.s-1mensural").extent (X_AXIS).length ();
+    find_by_name ("noteheads.sM1mensural").extent (X_AXIS).length ();
   Real flexa_width
     = robust_scm2double (ligature->get_property ("flexa-width"), 2);
   Real maxima_head_width
     = Font_interface::get_default_font (ligature)->
-    find_by_name ("noteheads.s-1neomensural").extent (X_AXIS).length ();
+    find_by_name ("noteheads.sM1neomensural").extent (X_AXIS).length ();
 
   flexa_width *= Staff_symbol_referencer::staff_space (ligature);
 
@@ -384,7 +384,7 @@ Mensural_ligature_engraver::fold_up_primitives (vector<Grob_info> primitives)
       if (Rhythmic_head::dot_count (current) > 0)
        // Move dots above/behind the ligature.
        {
-         if (i < primitives.size () - 1)
+         if (i + 1 < primitives.size ())
            // dot in the midst => move above head
            {
              // FIXME: Amount of vertical dot-shift should depend on
@@ -416,8 +416,18 @@ Mensural_ligature_engraver::build_ligature (Spanner *ligature,
 
 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, rest);
 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, note_head);
+
 ADD_TRANSLATOR (Mensural_ligature_engraver,
-               /* doc */ "Handles Mensural_ligature_events by glueing special ligature heads together.",
-               /* create */ "MensuralLigature",
-               /* read */ "",
-               /* write */ "");
+               /* doc */
+               "Handle @code{Mensural_ligature_events} by glueing special"
+               " ligature heads together.",
+
+               /* create */
+               "MensuralLigature ",
+
+               /* read */
+               "",
+
+               /* write */
+               ""
+               );