]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lyric-engraver.cc
release: 1.3.101
[lilypond.git] / lily / lyric-engraver.cc
index 7227f51f832a8edd51e088d970bcc000ff50ef8a..09e9fc9ee94eacf41e0e234bee8a5ac5b72c86dc 100644 (file)
@@ -3,15 +3,16 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "lyric-engraver.hh"
 #include "musical-request.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "paper-def.hh"
-#include "lookup.hh"
+#include "font-metric.hh"
+#include "side-position-interface.hh"
 
 ADD_THIS_TRANSLATOR (Lyric_engraver);
 
@@ -36,17 +37,24 @@ Lyric_engraver::do_try_music (Music*r)
 }
 
 void
-Lyric_engraver::do_process_requests()
+Lyric_engraver::do_process_music()
 {
   if (req_l_)
     {
-      text_p_=  new Text_item;
-      text_p_->text_str_ = req_l_->text_str_;
-      text_p_->text_str_ += " ";       // ugh.
+      text_p_=  new Item (get_property ("LyricText"));
+      
+      text_p_->set_elt_property ("text", req_l_->get_mus_property ("text"));
+
+      /*
+       We can't reach the notehead where we're centered from here. So
+       we kludge.
 
-      text_p_->set_elt_property ("non-rhythmic", SCM_BOOL_T);
+       (UGH UGH, pulled amount of space out of thin air)
+      */
+      
+      text_p_->translate_axis (0.66, X_AXIS);
       
-      announce_element (Score_element_info (text_p_, req_l_));
+      announce_element (text_p_, req_l_);
     }
 }