From: Han-Wen Nienhuys Date: Mon, 1 Jan 2007 16:29:14 +0000 (+0100) Subject: Fix #104. X-Git-Tag: release/2.11.7-1~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0b14e8b2e122df7adf340cc85e92ffd9b184098a;p=lilypond.git Fix #104. Don't center on X-parent when there is no notehead. Fixes weird spacing with wide Paper Columns due to long textscripts. --- diff --git a/input/regression/lyrics-no-notes.ly b/input/regression/lyrics-no-notes.ly new file mode 100644 index 0000000000..bc870f59b3 --- /dev/null +++ b/input/regression/lyrics-no-notes.ly @@ -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 + } +>> diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 75556716ec..06ffce0d50 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -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_;