]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #104.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 1 Jan 2007 16:29:14 +0000 (17:29 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 1 Jan 2007 16:29:14 +0000 (17:29 +0100)
Don't center on X-parent when there is no notehead.  Fixes weird
spacing with wide Paper Columns due to long textscripts.

input/regression/lyrics-no-notes.ly [new file with mode: 0644]
lily/lyric-engraver.cc

diff --git a/input/regression/lyrics-no-notes.ly b/input/regression/lyrics-no-notes.ly
new file mode 100644 (file)
index 0000000..bc870f5
--- /dev/null
@@ -0,0 +1,28 @@
+\header {
+  texidoc ="lyric syllables without note attachment are
+not centered; Centering may cause unintended effects when
+the papercolumn is very wide."
+  }
+\layout{
+  ragged-right = ##t
+}
+
+\version "2.10.7"
+<<
+  \new Staff \relative c' {
+    \key aes \major
+    \context Voice = "1" { 
+      f8 f
+      \emptyText
+      
+      f^"xxxxxxxxxxxxxxxxxxxxxxxxxx"  f
+    }
+  }
+  \new Lyrics \lyricmode {
+    \skip 8
+    \skip 8
+    x8
+    x8
+  }
+>>
index 75556716ec83cd3057ec78af55d873c656fff4f0..06ffce0d50ad4cc354015a88e4e623beb2d1da53 100644 (file)
@@ -9,12 +9,10 @@
 
 #include "context.hh"
 #include "engraver.hh"
-#include "font-metric.hh"
 #include "item.hh"
-#include "multi-measure-rest.hh"
 #include "note-head.hh"
-#include "rest.hh"
 #include "stream-event.hh"
+#include "international.hh"
 
 #include "translator.icc"
 
@@ -147,6 +145,11 @@ Lyric_engraver::stop_translation_timestep ()
              if (melisma_busy (voice))
                text_->set_property ("self-alignment-X", scm_from_int (LEFT));
            }
+         else
+           {
+             text_->warning (_ ("Lyric syllable does not have note. Use \\lyricsto or associatedVoice."));
+             text_->set_property ("X-offset", scm_from_int (0));
+           }
        }
 
       last_text_ = text_;