]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.42
authorfred <fred>
Tue, 26 Mar 2002 21:49:32 +0000 (21:49 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:49:32 +0000 (21:49 +0000)
Documentation/tex/fonts.doc
lily/multi-measure-rest.cc

index f380916b281ccd5abf1e99f307366e3ada4fb87a..37f81eb5ffae4c6e5639017bfc8130dbb21fc834 100644 (file)
@@ -1,4 +1,5 @@
-% -*-LaTeX-*-
+
+                                % -*-LaTeX-*-
 
 \documentclass{article}
 \def\kdots{,\ldots,}
@@ -20,9 +21,9 @@ notably \begin{itemize} \item B\"arenreiter \item Hofmeister \item
 Breitkopf \item Durand \& C'ie \end{itemize}
 
 The best references on Music engraving are Wanske\cite{wanske} and
-Ross\cite{ross} quite some of their insights were used.  Although it
-is a matter of taste, I'd say that B\"arenreiter has the finest
-typography of all.
+Ross\cite{ross} some of their insights were used.  Although it is a
+matter of taste, I'd say that B\"arenreiter has the finest typography
+of all.
 
 
 \section{Bezier curves for slurs}
@@ -192,15 +193,14 @@ Staffsize       &Numbers                &Name\\
 15.9pt  &No. 6          &Small middle\\
 13.7pt  &No. 7          &Cadenza\\
 11.1pt  &No. 8          &Pearl\\
-
     \end{tabular}
     \caption{Foo}
     \label{fonts:staff-size}
   \end{center}
 \end{table}
 
-Ross states that the dies (the stamps to make the symbols) come in
-12 different sizes.
+
+
 
 \section{Beams}
 
@@ -304,3 +304,27 @@ create and export glyphs.
 
 
 \end{document}
+
+\begin{verbatim}
+Paul Terry <paul@musonix.demon.co.uk> writes:
+
+Ross states that the dies (the stamps to make the symbols) come in
+12 different sizes.
+
+>Can you tell me how big rastrals are?
+
+According to the Score manual:
+
+   Rastral Size     Height in millimetres
+
+   0                9   mm
+   1                8   mm
+   2                7.5 mm
+   3                7   mm
+   4                6.5 mm
+   5                6   mm
+   6                5.5 mm
+
+I must say, despite having been a music setter for many years, I had to
+look these up - none of the publishers I work for deal in Rastral sizes
+these days (they all use millimetres).
index 0b2aaee70424162ae1c19b068a580fa5ce093708..b249a1b9a3a511af9b87956722b37a1023f6e8a2 100644 (file)
@@ -26,31 +26,63 @@ Multi_measure_rest::Multi_measure_rest ()
 void
 Multi_measure_rest::do_print () const
 {
+#ifndef NPRINT
   DOUT << "measures_i_ " << measures_i_;
+#endif
 }
 
+
+
+/*
+   [TODO]                                          17
+ * variable-sized multi-measure rest symbol: |====| ??
+ * build 3, 5, 6, 7, 8 symbols (how far, property?)
+       from whole, brevis and longa rests
+
+*/
 Molecule*
 Multi_measure_rest::do_brew_molecule_p () const
 {
+  Interval sp_iv;
+  Direction d = LEFT;
+  do
+    {
+      Item * col = spanned_drul_[d]->column_l ();
+
+      Interval coldim = col->extent (X_AXIS);
+
+      sp_iv[d] = coldim[-d]  ;
+    }
+  while ((flip (&d)) != LEFT);
+  Molecule *mol_p  = new Molecule;
+  Real x_off = 0.0;
+
+
+  Dimension_cache * col_ref = spanned_drul_[LEFT]->column_l ()->dim_cache_[X_AXIS];
+
+  Real rx  = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
   /*
-   [TODO]                                          17
-     * variable-sized multi-measure rest symbol: |====| ??
-     * build 3, 5, 6, 7, 8 symbols (how far, property?)
-       from whole, brevis and longa rests
+    we gotta stay clear of sp_iv, so move a bit to the right if
+    needed.
    */
-  Molecule* mol_p = new Molecule;
-  if (!column_arr_.size ())
-    return mol_p;
+  x_off += (sp_iv[LEFT] -  rx) >? 0;
+
+  /*
+    center between stuff.
+   */
+  x_off += sp_iv.length ()/ 2;
 
+  
   Molecule s;
   if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) 
     {
-      s = (lookup_l ()->rest (- intlog2(measures_i_), 0, ""));
+      s = lookup_l ()->rest (- intlog2(measures_i_), 0, "");
       s.translate_axis (-s.extent ()[X_AXIS].length () / 2, X_AXIS);
     }
   else 
     {
-      s = (lookup_l ()->rest (-4, 0, ""));
+      s = lookup_l ()->rest (-4, 0, "");
     }
   mol_p->add_molecule (s);
   Real interline_f = staff_line_leading_f ();
@@ -58,8 +90,7 @@ Multi_measure_rest::do_brew_molecule_p () const
     {
       mol_p->translate_axis (interline_f, Y_AXIS);
     }
-
-  if (measures_i_ > 1)
+  else if (measures_i_ > 1)
     {
       Molecule s ( lookup_l ()->text ("number", to_str (measures_i_)));
 
@@ -67,6 +98,7 @@ Multi_measure_rest::do_brew_molecule_p () const
       mol_p->add_molecule (s);
     }
 
+  mol_p->translate_axis (x_off, X_AXIS);
   return mol_p;
 }
 
@@ -83,10 +115,11 @@ Multi_measure_rest::do_add_processing ()
 void
 Multi_measure_rest::do_post_processing ()
 {
-  if (column_arr_.size ())
-    translate_axis (extent (X_AXIS).length () / 2, X_AXIS);
+  if (!column_arr_.size ())
+    set_elt_property (transparent_scm_sym, SCM_BOOL_T);
 }
 
+
 void
 Multi_measure_rest::do_substitute_element_pointer (Score_element* o, Score_element* n)
 {
@@ -107,9 +140,52 @@ Array<Rod>
 Multi_measure_rest::get_rods () const
 {
   Array<Rod> a;
-  Rod r;
-  r.item_l_drul_ = spanned_drul_;
-  r.distance_f_ = paper_l ()->get_var ("mmrest_x_minimum");
-  a.push (r);
+
+  if (!(spanned_drul_[LEFT] && spanned_drul_[RIGHT]))
+    {
+      programming_error ("Multi_measure_rest::get_rods (): I am not spanned!");
+       return a;
+    }
+      Rod r;
+      r.item_l_drul_ = spanned_drul_;
+      r.distance_f_ = paper_l ()->get_var ("mmrest_x_minimum");
+      a.push (r);
+
+  
+  /*
+    also set distances in case the left or right ending of the rest is
+    a broken column. This is very common: it happens if the rest is in
+    the beginning of the line, or at the end.
+
+    TODO: merge this code with other discretionary handling code.
+
+    TODO: calc  mmrest_x_minimum (see brew_molecule_p ())
+  */
+
+  Drul_array<Item*> discretionaries;
+  Direction d = LEFT;
+  do
+    {
+      Item *i = r.item_l_drul_[d]->find_prebroken_piece (-d);
+      discretionaries[d] = i;
+      if (i)
+      {
+        Rod k (r);
+
+        k.item_l_drul_[d] = i;
+        a.push (k);
+      }
+    }
+  while ((flip (&d))!= LEFT);
+
+  if (discretionaries[LEFT] && discretionaries[RIGHT])
+    {
+      Rod k(r);
+      k.item_l_drul_ = discretionaries;
+      a.push (k);
+    }
+
+
+
   return a;
 }