]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.75
authorfred <fred>
Tue, 26 Mar 2002 23:25:35 +0000 (23:25 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:25:35 +0000 (23:25 +0000)
Documentation/regression-test.tely
input/bugs/non-empty-text.ly [new file with mode: 0644]
input/test/non-empty-text.ly [new file with mode: 0644]
lily/text-engraver.cc

index 0e745b244f1b4717ed311193e4ce320d58da7eb4..e07ea7dfb995e82ccc80740068038fe9c03ba218 100644 (file)
@@ -12,7 +12,7 @@
 
 @section Introduction
 
-This document tries give an brief overview of LilyPond features.  When
+This document tries give a brief overview of LilyPond features.  When
 the text correspond with the shown notation, we consider LilyPond
 Officially BugFree (tm).  This document is intended for finding bugs,
 and documenting bugfixes.
@@ -309,6 +309,11 @@ lyrics don't collide with barlines.
 
 @mudelafile{lyrics-bar.ly}
 
+Text is set with empty horizontal dimensions.  The boolean property
+textNonEmpty is used to respect the horizontal size of text.
+
+@mudelafile{non-empty-text.ly}
+
 @section Global stuff
 
 Breaks can be encouraged and discouraged using @code{\break} and
diff --git a/input/bugs/non-empty-text.ly b/input/bugs/non-empty-text.ly
new file mode 100644 (file)
index 0000000..6244598
--- /dev/null
@@ -0,0 +1,23 @@
+%
+% Try this file with 1.2.17: it works
+% 1.2 had a different default, and uses textEmptyDimension scalar property
+%
+\score{
+       \notes\relative c''{
+               %\property Staff.textEmptyDimension=1
+               a-"This text has no"
+               a
+               a
+               a-"width; the default"
+               \break
+               \property Staff.textNonEmpty=##t
+               %\property Staff.textEmptyDimension=0
+               a-"This text"
+               a-"is fat: notes are spaced"
+               a-"far apart and text"
+               a-"does not collide"
+               }
+         \paper{
+             linewidth=80.\mm;
+         }
+}
diff --git a/input/test/non-empty-text.ly b/input/test/non-empty-text.ly
new file mode 100644 (file)
index 0000000..6244598
--- /dev/null
@@ -0,0 +1,23 @@
+%
+% Try this file with 1.2.17: it works
+% 1.2 had a different default, and uses textEmptyDimension scalar property
+%
+\score{
+       \notes\relative c''{
+               %\property Staff.textEmptyDimension=1
+               a-"This text has no"
+               a
+               a
+               a-"width; the default"
+               \break
+               \property Staff.textNonEmpty=##t
+               %\property Staff.textEmptyDimension=0
+               a-"This text"
+               a-"is fat: notes are spaced"
+               a-"far apart and text"
+               a-"does not collide"
+               }
+         \paper{
+             linewidth=80.\mm;
+         }
+}
index f6661e2359ff73f20f8f06fbb9cf78b74c22a684..0fa41ca7cd98b2fdec077db2d7967671d23745dc 100644 (file)
@@ -97,8 +97,22 @@ Text_engraver::do_process_music ()
       if (r->style_str_.length_i ())
        text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
       
-      SCM empty = get_property ("textNonEmpty");
-      if (to_boolean (empty))
+      /*
+       huh?, this said:
+
+        SCM empty = get_property ("textNonEmpty");
+        if (to_boolean (empty))
+           no-spacing-rods
+
+       Text is empty by default, which means that the only condition
+       for not setting 'no-spacing-rods' should be: boolean && true.
+
+       Anyway, non-empty text has been broken for some time now.
+       */
+      SCM nonempty = get_property ("textNonEmpty");
+      if (to_boolean (nonempty))
+        ;
+      else
        {
          text->set_elt_property ("no-spacing-rods" , SCM_BOOL_F);
          text->set_extent_callback (0, X_AXIS);