]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lyric-hyphen.cc
Fixes broken glissando bug and adds a regtest for broken glissandos.
[lilypond.git] / lily / lyric-hyphen.cc
index 449e05d1175bb57aca32347e9b1f2203993be5b3..b80fcaa7d0a7b6699c5016bfffc3629ecd5b9414 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2003--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2003--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -35,10 +35,19 @@ MAKE_SCHEME_CALLBACK (Lyric_hyphen, print, 1);
 SCM
 Lyric_hyphen::print (SCM smob)
 {
+
   Spanner *me = unsmob_spanner (smob);
   Drul_array<Item *> bounds (me->get_bound (LEFT),
                             me->get_bound (RIGHT));
 
+  /* No hyphen should be printed under a grace note at the start
+     of a line if the grace's main note starts a new syllable.  */
+
+  if (Paper_column::when_mom (bounds[LEFT]->get_column ()).grace_part () != Rational (0)
+      && Paper_column::when_mom (bounds[LEFT]->get_column ()).main_part ()
+      == Paper_column::when_mom (bounds[RIGHT]->get_column ()).main_part ())
+    return SCM_EOL;
+
   if (bounds[LEFT]->break_status_dir ()
       && (Paper_column::when_mom (bounds[LEFT])
          == Paper_column::when_mom (bounds[RIGHT]->get_column ())))
@@ -153,4 +162,3 @@ ADD_INTERFACE (Lyric_hyphen,
               "padding "
               "thickness "
               );
-