]> git.donarmstrong.com Git - lilypond.git/commitdiff
text empty
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 25 May 2002 11:45:27 +0000 (11:45 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 25 May 2002 11:45:27 +0000 (11:45 +0000)
ChangeLog
Documentation/user/refman.itely
input/bugs/hjbugs.ly [deleted file]
lily/fingering-engraver.cc
lily/staff-symbol.cc
lily/text-engraver.cc
ly/property-init.ly
scripts/convert-ly.py

index fa5d23ab60fe6b8c067e728d255c5d644c830920..5243032f3c7c339ca6d16fef0d6547418b08cb6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index 8833e029d86b407834bae9421878f157bc66f482..b1c17254057318f17c5e1c39864e2145c949f8e8 100644 (file)
@@ -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 (file)
index 6f2e93c..0000000
+++ /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 {
-       <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{}
- }
index 90dba9870951b7295f562e1a6efc3c2a91a142eb..841673358ec7bd05652884b3584131553647f370 100644 (file)
@@ -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 */       "");
index 6d36b043e6ae76975f497ea182d244ebdc04979e..c2e2bb0c7f8c6f88163f6a983431934bc19471e7 100644 (file)
@@ -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
index f720ff15a7dfa165481c3fede5e10a60fd405e1f..39b0a973ffb7b719efec4f054c5e5a3fd055a540 100644 (file)
@@ -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 */       "");
index ba3c230fad138add5c8d3997ecccf4fc959db3ea..cfe089871c32f9c7af048758f6569e82b445711e 100644 (file)
@@ -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
index 073e0ecd972d9babe5dea50cc80b43b89a817943..c05e3e0f61424310ad743f52f7f3b4c531ab1216 100644 (file)
@@ -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      
 ################################