From: hanwen Date: Sat, 25 May 2002 11:45:27 +0000 (+0000) Subject: text empty X-Git-Tag: release/1.5.59~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eb04282091730451649c0d17753bea58b1f8f563;p=lilypond.git text empty --- diff --git a/ChangeLog b/ChangeLog index fa5d23ab60..5243032f3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-05-25 Han-Wen + + * scripts/convert-ly.py: add textNonEmpty rule + + * lily/text-engraver.cc (create_grobs): remove textNonEmpty + 2002-05-24 Jan Nieuwenhuizen * lily/text-item.cc (markup_text2molecule): Junk ugly lookahead by diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 8833e029d8..b1c1725405 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1416,11 +1416,11 @@ text (see @ref{Text markup}) above or below notes by using a string: @code{c^"text"}. By default, these indications do not influence the note spacing, but -if @code{Voice.textNonEmpty} is set to true the widths will be taken -into account. The identifier @code{\fatText} is defined in the standard -includes. -@lilypond[fragment,singleline,verbatim] -\relative c' { c4^"longtext" \fatText c4_"longlongtext" c4 } +by setting the grob property @code{no-spacing-rods} to false, the +widths will be taken into account. The identifier @code{\fatText} is +defined in the standard includes. +@lilypond[fragment,singleline,verbatim] \relative c' { c4^"longtext" +\fatText c4_"longlongtext" c4 } @end lilypond Text scripts are created in form of @internalsref{TextScript} grobs, in diff --git a/input/bugs/hjbugs.ly b/input/bugs/hjbugs.ly deleted file mode 100644 index 6f2e93c889..0000000000 --- a/input/bugs/hjbugs.ly +++ /dev/null @@ -1,36 +0,0 @@ -%{ - -2) Grace-output broken: \grace a8 ~ a2 \grace a8 ~ a2 - -Expected : a8( )a2 a8( )a2 -BUG-here : a8( )a2( a8 )a2 - -3) Vertical aligns of lines, i.e., line height incorrect: - -c^#'(lines (finger "1" "")) % upper 1, lower 1 -c^#'(lines (finger "1" "1")) % upper 1, lower 1 -\stemDown -c_#'(lines (finger "" "1")) % upper 1/2 ?!?, lower 1 <- BUG IN UPPER LINE -c_#'(lines (finger "1" "1")) % upper 1, lower 1 - -%} - - -\score { - \notes \transpose c'' - \context Voice { - ~~~ % paper & midi broken - ~~~ % here both are ok. - c^#'(lines (finger "1" "")) - c^#'(lines (finger "1" "1")) - \stemDown - c_#'(lines (finger "" "1")) % wrong line height of an empty line - c_#'(lines (finger "1" "1")) - - \grace a8 ~ a2 \grace a8 ~ a2 a8 - % produces: a8( )a2( a8 )a2 and midi: a1 (a2 \grace a a -> a2) - % should be: a8( )a2 a8( )a2 should be: a2 a2 - } - \midi{} - \paper{} - } diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index 90dba98709..841673358e 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -198,13 +198,6 @@ Fingering_engraver::make_script (Direction d, Music *r,Axis a, int i) } fingering->set_grob_property ("text", r->get_mus_property ("text")); - - SCM nonempty = get_property ("textNonEmpty"); - if (to_boolean (nonempty)) - /* - empty fingering: signal that no rods should be applied. - */ - fingering->set_grob_property ("no-spacing-rods" , SCM_BOOL_F); announce_grob (fingering, r->self_scm()); fingerings_.push (fingering); @@ -243,5 +236,5 @@ ENTER_DESCRIPTION(Fingering_engraver, /* descr */ "Create fingering-scripts", /* creats*/ "Fingering", /* acks */ "rhythmic-head-interface stem-interface", -/* reads */ "scriptHorizontal textNonEmpty", +/* reads */ "scriptHorizontal", /* write */ ""); diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 6d36b043e6..c2e2bb0c7f 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -35,8 +35,7 @@ Staff_symbol::brew_molecule (SCM smob) SCM width_scm = me->get_grob_property ("width"); if (gh_number_p (width_scm)) // user-defined width { - width = - gh_scm2double (width_scm) * + width = gh_scm2double (width_scm) * Staff_symbol_referencer::staff_space (me); } else // determine width automatically diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index f720ff15a7..39b0a973ff 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -89,11 +89,6 @@ Text_engraver::create_grobs () // URG: Text vs TextScript String basic = "TextScript"; - if (r->get_mus_property ("text-type") == ly_symbol2scm ("finger")) - { - basic = "Fingering"; - } - Item *text = new Item (get_property (basic.ch_C ())); /* @@ -104,19 +99,6 @@ Text_engraver::create_grobs () Axis ax = to_boolean (axisprop) ? X_AXIS : Y_AXIS; Side_position_interface::set_axis (text, ax); -#if 0 - if (r->style_str_ == "finger" && ax == Y_AXIS) - { - /* - nicely center the scripts. - */ - text->add_offset_callback (Side_position_interface::aligned_on_self_proc, X_AXIS); - text->add_offset_callback (Side_position_interface::centered_on_parent_proc, X_AXIS); - } -#endif - - - /* make sure they're in order by adding i to the priority field. */ @@ -127,19 +109,6 @@ Text_engraver::create_grobs () Side_position_interface::set_direction (text, r->get_direction ()); text->set_grob_property ("text", r->get_mus_property ("text")); - - SCM nonempty = get_property ("textNonEmpty"); - - if (gh_boolean_p (nonempty)) - if (gh_scm2bool (nonempty)) - /* - empty text: signal that no rods should be applied. - Default nowadays. - */ - text->set_grob_property ("no-spacing-rods" , SCM_BOOL_F); - else - text->set_grob_property ("no-spacing-rods" , SCM_BOOL_T); - announce_grob (text, r->self_scm ()); texts_.push (text); } @@ -171,5 +140,5 @@ ENTER_DESCRIPTION(Text_engraver, /* descr */ "Create text-scripts", /* creats*/ "TextScript", /* acks */ "rhythmic-head-interface stem-interface", -/* reads */ "scriptHorizontal textNonEmpty", +/* reads */ "scriptHorizontal", /* write */ ""); diff --git a/ly/property-init.ly b/ly/property-init.ly index ba3c230fad..cfe089871c 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -119,8 +119,8 @@ endincipit = \notes{ autoBeamOff = \property Voice.autoBeaming = ##f autoBeamOn = \property Voice.autoBeaming = ##t -emptyText = \property Voice.textNonEmpty = ##f -fatText = \property Voice.textNonEmpty = ##t +fatText = \property Voice.TextScript \set #'no-spacing-rods = ##f +emptyText = \property Voice.TextScript \set #'no-spacing-rods = ##t showStaffSwitch = \property Voice.followVoice = ##t hideStaffSwitch = \property Voice.followVoice = ##f diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 073e0ecd97..c05e3e0f61 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -857,6 +857,15 @@ if 1: conversions.append (((1,5,56), conv, 'Pitch::transpose->ly-transpose-pitch')) +if 1: + def conv (str): + str = re.sub ('textNonEmpty *= *##t', "TextScript \\set #'no-spacing-rods = ##f", str) + str = re.sub ('textNonEmpty *= *##f', "TextScript \\set #'no-spacing-rods = ##t", str) + return str + + conversions.append (((1,5,58), conv, 'deprecate textNonEmpty')) + + ################################ # END OF CONVERSIONS ################################