From: fred Date: Tue, 26 Mar 2002 23:25:35 +0000 (+0000) Subject: lilypond-1.3.75 X-Git-Tag: release/1.5.59~1432 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2c910abcf35e80e4ed1d4dec5bbe87a7cba7b34c;p=lilypond.git lilypond-1.3.75 --- diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 0e745b244f..e07ea7dfb9 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -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 index 0000000000..6244598991 --- /dev/null +++ b/input/bugs/non-empty-text.ly @@ -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 index 0000000000..6244598991 --- /dev/null +++ b/input/test/non-empty-text.ly @@ -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/lily/text-engraver.cc b/lily/text-engraver.cc index f6661e2359..0fa41ca7cd 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -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);