]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-engraver.cc
release: 1.3.55
[lilypond.git] / lily / text-engraver.cc
index 194b779774f5a24378275894a79aa2fc6a0c0750..a3d72332f9f13b6ce1b623d8f9f6099d877cd14b 100644 (file)
@@ -30,7 +30,7 @@ protected:
   virtual bool do_try_music (Music* m);
   virtual void do_pre_move_processing ();
   virtual void do_post_move_processing ();
-  virtual void do_process_requests ();
+  virtual void do_process_music ();
   virtual void acknowledge_element (Score_element_info);
 };
 
@@ -72,13 +72,13 @@ Text_engraver::acknowledge_element (Score_element_info i)
 }
 
 void
-Text_engraver::do_process_requests ()
+Text_engraver::do_process_music ()
 {
   for (int i=0; i < reqs_.size (); i++)
     {
       Text_script_req * r = reqs_[i];
 
-      Text_item *text = new Text_item;
+      Text_item *text = new Text_item (SCM_EOL);
       Side_position_interface stafy (text);
 
       SCM axisprop = get_property ("scriptHorizontal");
@@ -89,9 +89,12 @@ Text_engraver::do_process_requests ()
        }
       else
        stafy.set_axis (Y_AXIS);
-      
+
+      /*
+       make sure they're in order by adding i to the priority field.
+       */
       text->set_elt_property ("script-priority",
-                           gh_int2scm (200));
+                           gh_int2scm (200 + i));
 
       if (r->get_direction ())
        stafy.set_direction (r->get_direction ());
@@ -102,12 +105,12 @@ Text_engraver::do_process_requests ()
       if (r->style_str_.length_i ())
        text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
       
-      SCM empty = get_property ("textEmptyDimension");
-      if (to_boolean (empty))
+      SCM empty = get_property ("textNonEmpty");
+      if (!to_boolean (empty))
        {
-         text->set_empty (X_AXIS);
+         text->set_elt_property ("no-spacing-rods" , SCM_BOOL_T);
+         text->set_extent_callback (0, X_AXIS);
        }
-
       announce_element (Score_element_info (text, r));
       texts_.push (text);
     }
@@ -118,8 +121,9 @@ Text_engraver::do_pre_move_processing ()
 {
   for (int i=0; i < texts_.size (); i++)
     {
-      side_position (texts_[i]).add_staff_support ();
-      typeset_element (texts_[i]);
+      Text_item *ti = texts_[i];
+      Side_position_interface (ti).add_staff_support ();
+      typeset_element (ti);
     }
   texts_.clear ();
 }