From 854175e8fcab8855a04bd4daf8e69271cddaeb7f Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 21:49:32 +0000 Subject: [PATCH] lilypond-1.1.42 --- Documentation/tex/fonts.doc | 38 ++++++++++--- lily/multi-measure-rest.cc | 110 ++++++++++++++++++++++++++++++------ 2 files changed, 124 insertions(+), 24 deletions(-) diff --git a/Documentation/tex/fonts.doc b/Documentation/tex/fonts.doc index f380916b28..37f81eb5ff 100644 --- a/Documentation/tex/fonts.doc +++ b/Documentation/tex/fonts.doc @@ -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 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). diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 0b2aaee704..b249a1b9a3 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -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 Multi_measure_rest::get_rods () const { Array 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 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; } -- 2.39.5