+2002-05-25 Han-Wen <hanwen@cs.uu.nl>
+
+ * scripts/convert-ly.py: add textNonEmpty rule
+
+ * lily/text-engraver.cc (create_grobs): remove textNonEmpty
+
2002-05-24 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/text-item.cc (markup_text2molecule): Junk ugly lookahead by
@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
+++ /dev/null
-%{
-
-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 {
- <e>~<e>~<c e fis>~<b e f> % paper & midi broken
- <e>~<e>~<c e fis>~<b e f> % 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{}
- }
}
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);
/* descr */ "Create fingering-scripts",
/* creats*/ "Fingering",
/* acks */ "rhythmic-head-interface stem-interface",
-/* reads */ "scriptHorizontal textNonEmpty",
+/* reads */ "scriptHorizontal",
/* write */ "");
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
// 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 ()));
/*
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.
*/
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);
}
/* descr */ "Create text-scripts",
/* creats*/ "TextScript",
/* acks */ "rhythmic-head-interface stem-interface",
-/* reads */ "scriptHorizontal textNonEmpty",
+/* reads */ "scriptHorizontal",
/* write */ "");
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
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
################################