]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-spanner.cc
* lily/include/debug.hh: deprecate.
[lilypond.git] / lily / text-spanner.cc
index a6cb05fe9351fe333a3cd403eabd47e8144fe325..ebcac1ee5522c17d7f7f3bf68e164f02f0fbe7a3 100644 (file)
@@ -15,7 +15,7 @@ source file of the GNU LilyPond music typesetter
 #include "font-interface.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-column.hh"
 #include "staff-symbol-referencer.hh"
 
@@ -244,17 +244,19 @@ Text_spanner::setup_pedal_bracket(Spanner *me)
   if ( to_boolean (me->get_grob_property ("text-start")) )
     {
       height[LEFT] = 0;
-      Grob * textbit = unsmob_grob (me->get_grob_property("pedal-text"));
       extra_short = padding;
-      if (textbit->internal_has_interface(ly_symbol2scm("text-interface"))) 
-       // for plain text, e.g., Sost. Ped.
+      if (Grob *textbit = unsmob_grob (me->get_grob_property("pedal-text")))
        {
-         SCM text  =  textbit->get_grob_property("text"); 
-         if (gh_string_p (text)) {
-           SCM properties = Font_interface::font_alist_chain (me);
-           Molecule mol = Text_item::text2molecule (me, text, properties);
-           extra_short += mol.extent(X_AXIS).length() / 2;
-         }
+         if (textbit->internal_has_interface(ly_symbol2scm("text-interface")))
+           // for plain text, e.g., Sost. Ped.
+           {
+             SCM text  =  textbit->get_grob_property("text"); 
+             if (gh_string_p (text)) {
+               SCM properties = Font_interface::font_alist_chain (me);
+               Molecule mol = Text_item::text2molecule (me, text, properties);
+               extra_short += mol.extent(X_AXIS).length() / 2;
+             }
+           }
        }
       shorten[RIGHT] -= thick;
     }
@@ -291,5 +293,5 @@ ADD_INTERFACE (Pianopedal,"piano-pedal-interface",
 
 ADD_INTERFACE (Text_spanner,"text-spanner-interface",
               "generic text spanner",
-              "dash-period if-text-padding dash-length edge-height edge-widen edge-text shorten-pair type");
+              "dash-period if-text-padding dash-length edge-height edge-widen edge-text shorten-pair type thickness outer width-correct");