]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-spanner.cc
release: 1.5.19
[lilypond.git] / lily / text-spanner.cc
index ba1e420fc18370c6a80c88547dad099a53e77349..b7b7bfc9c73388e100469e9d49c2523caaad942f 100644 (file)
@@ -4,7 +4,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 2000--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "molecule.hh"
@@ -81,7 +81,7 @@ Text_spanner::brew_molecule (SCM smob)
 
 
   SCM properties = Font_interface::font_alist_chain (me);
-  
+
   SCM edge_text = me->get_grob_property ("edge-text");
   Drul_array<Molecule> edge;
   if (gh_pair_p (edge_text))
@@ -89,10 +89,14 @@ Text_spanner::brew_molecule (SCM smob)
       Direction d = LEFT;
       do
        {
-         SCM text = index_cell (edge_text, d);
-         edge[d] = Text_item::text2molecule (me, text, properties);
-         if (!edge[d].empty_b ())
-           edge[d].align_to (Y_AXIS, CENTER);
+         /*  Don't repeat edge text for broken end */
+         if (!broken[d])
+           {
+             SCM text = index_cell (edge_text, d);
+             edge[d] = Text_item::text2molecule (me, text, properties);
+             if (!edge[d].empty_b ())
+               edge[d].align_to (Y_AXIS, CENTER);
+           }
        }
       while (flip (&d) != LEFT);
     }
@@ -106,8 +110,8 @@ Text_spanner::brew_molecule (SCM smob)
   SCM s = me->get_grob_property ("shorten");
   if (gh_pair_p (s))
     {
-      shorten[LEFT] = gh_scm2double (gh_car (s));
-      shorten[RIGHT] = gh_scm2double (gh_cdr (s));
+      shorten[LEFT] = gh_scm2double (ly_car (s));
+      shorten[RIGHT] = gh_scm2double (ly_cdr (s));
     }
 
   width -= shorten[LEFT] + shorten[RIGHT];
@@ -121,14 +125,7 @@ Text_spanner::brew_molecule (SCM smob)
   /* ugh */
   Real thick = me->paper_l ()->get_var ("stafflinethickness");  
   
-  Molecule line;
-  SCM list = Line_spanner::line_atom (me, width, 0);
-  if (list != SCM_EOL)
-    {
-      
-      Box b (Interval (0, width), Interval (-thick / 2, thick / 2));
-      line = Molecule (b, list);
-    }
+  Molecule line = Line_spanner::line_molecule (me, width, 0);
   
   Drul_array<Molecule> edge_line;
   s = me->get_grob_property ("edge-height");