]> git.donarmstrong.com Git - lilypond.git/commitdiff
Use lyricMelismaAlignment for manual melismata alignment.
authorNeil Puttock <n.puttock@gmail.com>
Mon, 7 Feb 2011 23:36:26 +0000 (23:36 +0000)
committerNeil Puttock <n.puttock@gmail.com>
Mon, 7 Feb 2011 23:36:26 +0000 (23:36 +0000)
* input/regression (lyric-melisma-alignment.ly):

  new regression test; test lyricMelismaAlignment settings with automatic
  and manual melismata

* input/regression (lyric-melisma-manual.ly):

  style nitpicks

* lily/lyric-engraver.cc (process_music):

  set 'self-alignment-X for manual melismata using lyricMelismaAlignment
  instead of hard-coding to LEFT

input/regression/lyric-melisma-alignment.ly [new file with mode: 0644]
input/regression/lyric-melisma-manual.ly
lily/lyric-engraver.cc

diff --git a/input/regression/lyric-melisma-alignment.ly b/input/regression/lyric-melisma-alignment.ly
new file mode 100644 (file)
index 0000000..4255ce3
--- /dev/null
@@ -0,0 +1,18 @@
+\version "2.13.49"
+
+\header {
+  texidoc = "@code{lyricMelismaAlignment} sets the default alignment for melismata.
+It works with both automatic and manual melismata."
+}
+
+\relative c' {
+  c4^"auto"( d e f)
+  \set melismaBusyProperties = #'()
+  c4^"manual" d e f
+}
+\addlyrics {
+  \set lyricMelismaAlignment = #RIGHT
+  right-align __
+  \set lyricMelismaAlignment = #CENTER
+  center  __ _ _ _
+}
index 11e3f44cbd02f47546ccb08331b10ce60b1ecd48..08d31cc7c5fc6767d4991188d2dc14a5b4102316 100644 (file)
@@ -1,17 +1,15 @@
-\header {
-
-  texidoc = "Melisma's may be entered manually by substituting
-  @code{_} for lyrics on notes that are part of the melisma."
-
-}
-
 \version "2.12.0"
-\paper {
-  ragged-right = ##t
+
+\header {
+  texidoc = "Melismata may be entered manually by substituting
+@code{_} for lyrics on notes that are part of the melisma."
 }
 
 \relative c' {
   \set melismaBusyProperties = #'()
-  c d( e) f f( e) e e  }
-\addlyrics
- { Ky -- _ _ ri __ _ _ _  e }
+  c4 d( e) f
+  f4( e) e e
+}
+\addlyrics {
+  Ky -- _ _ ri __ _ _ _  e
+}
index 136a50135866ec92cd7f44445b71fb54e0b2bed4..ffae2783ba2d409ea3b6ccf445ef6a3476feff72 100644 (file)
@@ -73,7 +73,8 @@ Lyric_engraver::process_music ()
       if (ly_is_equal (text, scm_from_locale_string (" ")))
        {
          if (last_text_)
-           last_text_->set_property ("self-alignment-X", scm_from_int (LEFT));
+           last_text_->set_property ("self-alignment-X",
+                                     get_property ("lyricMelismaAlignment"));
        }
       else
        text_ = make_item ("LyricText", event_->self_scm ());