prevent collision of ligatures and next note (issue 6740046)
Reviewers: , Message: mensural-ligatures.ly is listed as changed - that is not surprising, although I couldn't tell in advance _how_ it will change. what is a bit more surprising that I can't tell even now, having seen the regtest comparison. Description: prevent collision of ligatures and next note Please review this at http://codereview.appspot.com/6740046/ Affected files: M lily/mensural-ligature-engraver.cc M scm/define-grobs.scm Index: lily/mensural-ligature-engraver.cc diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index 35b8614b0d62fa2a657510c68b9ac3fc35e37144..848ca0cb4b003a11a0e3cc63cbfe78f1065d7a0a 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -64,9 +64,11 @@ public: TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver); private: - void transform_heads (vector primitives); - void propagate_properties (Spanner *ligature, vector primitives); - void fold_up_primitives (vector primitives); + void transform_heads (vector const &primitives); + void propagate_properties (Spanner *ligature, + vector const &primitives); + void fold_up_primitives (Spanner *ligature, + vector const &primitives); }; IMPLEMENT_TRANSLATOR_LISTENER (Mensural_ligature_engraver, ligature); @@ -89,7 +91,7 @@ Mensural_ligature_engraver::create_ligature_spanner () } void -Mensural_ligature_engraver::transform_heads (vector primitives) +Mensural_ligature_engraver::transform_heads (vector const &primitives) { if (primitives.size () < 2) { @@ -336,7 +338,7 @@ Mensural_ligature_engraver::transform_heads (vector primitives) */ void Mensural_ligature_engraver::propagate_properties (Spanner *ligature, - vector primitives) + vector const &primitives) { Real thickness = robust_scm2double (ligature->get_property ("thickness"), 1.3); @@ -349,6 +351,7 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature, Real maxima_head_width = Font_interface::get_default_font (ligature)-> find_by_name ("noteheads.sM3ligmensural").extent (X_AXIS).length (); + Real min_length = 0.0; Item *prev_primitive = NULL; for (vsize i = 0; i < primitives.size (); i++) @@ -362,9 +365,11 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature, { case MLP_BREVIS: case MLP_LONGA: + min_length += head_width; primitive->set_property ("head-width", scm_from_double (head_width)); break; case MLP_MAXIMA: + min_length += maxima_head_width; primitive->set_property ("head-width", scm_from_double (maxima_head_width)); break; @@ -377,6 +382,7 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature, { SCM flexa_scm = primitive->get_property ("flexa-width"); Real const flexa_width = robust_scm2double (flexa_scm, 2.0); +min_length += flexa_width + thickness; SCM head_width = scm_from_double (0.5 * (flexa_width + thickness)); primitive->set_property ("head-width", head_width); prev_primitive->set_property ("head-width", head_width); @@ -390,10 +396,13 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature, prev_primitive = primitive; } + + ligature->set_property ("minimum-length", scm_from_double (min_length)); } void -Mensural_ligature_engraver::fold_up_primitives (vector primitives) +Mensural_ligature_engraver::fold_up_primitives (Spanner *ligature, +vector const &primitives) { Item *first = 0; Real distance = 0.0; @@ -416,7 +425,7 @@ Mensural_ligature_engraver::fold_up_primitives (vector primitives) Real head_width = scm_to_double (current->get_property ("head-width")); distance += head_width - thickness; - if (Rhythmic_head::dot_count (current) > 0) + if (size_t const dot_count = Rhythmic_head::dot_count (current)) /* Move dots above/behind the ligature. dots should also avoid staff lines. @@ -452,6 +461,12 @@ Mensural_ligature_engraver::fold_up_primitives (vector primitives) else if (delta == 1 || delta == -1) vert_shift -= delta * staff_space; } + else +ligature->set_property + ("minimum-length", + scm_from_double + (head_width*dot_count + robust_scm2double +(ligature->get_property ("minimum-length"), 0.0))); dot_gr->translate_axis (vert_shift, Y_AXIS); @@ -470,7 +485,7 @@ Mensural_ligature_engraver::build_ligature (Spanner *ligature, { transform_heads (primitives); propagate_pro
Re: Update contributors. (issue 6689045)
On Fri, Oct 19, 2012 at 01:54:55PM -0400, Julien Rioux wrote: > On Fri, Oct 19, 2012 at 8:47 AM, Janek Warchoł > wrote: > > On Fri, Oct 19, 2012 at 10:36 AM, wrote: > >> The list of main developers looks rather long. Are there any "current > >> developers" to move to "previous developers" (e.g. they haven't been > >> around for a while)? > > > > I don't remember any commits from Jonathan Kulp, Mark Polesky, Carl > > Sorensen and Neil Puttock in past couple of months, but all of them > > send an email or two from time to time. > > Seems fine then. I meant more like if there was inactivity for years. The current policy on this is that developers can give themselves whatever title they want, and it's up to them to decide if they should be listed as "current" or "previous". The vague hope is that we'll keep a number of "developer emeritus" around who are still willing to review the occasional patch or discuss important issues. I'd expect that if somebody lists themselves under "previous developer", then they'd be gone for good. (that's why I haven't moved myself over) - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Update contributors. (issue 6689045)
On Fri, Oct 19, 2012 at 8:47 AM, Janek Warchoł wrote: > On Fri, Oct 19, 2012 at 10:36 AM, wrote: >> I missed that Bertrand Bordage, Joe Neeman, and Carl D. Sorensen are >> listed both under "developers" and "contributors". According to the >> policy they should be removed from "contributors". Also Colin Hall is >> listed under "developers" so probably should not be added under >> "contributors: bug squad" like I did. >> >> The list of main developers looks rather long. Are there any "current >> developers" to move to "previous developers" (e.g. they haven't been >> around for a while)? > > depends on what you mean. > I don't remember any commits from Jonathan Kulp, Mark Polesky, Carl > Sorensen and Neil Puttock in past couple of months, but all of them > send an email or two from time to time. > Janek Seems fine then. I meant more like if there was inactivity for years. Cheers, Julien ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Bug suspicion with figured bass
Dominique Faure wrote > Hi, > > Trying to apply some gracefully given code to handle exotic layouts > (cf. Vertical text at the end of score messages on the user > mailing-list), I found a strange behaviors while using figured bass. the 3rd staff ends prematurely, it should read (with the endingText inside the brackets!): \relative c'' { c2 c, \bar "|." \endingText \markup { \justify-string #"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." } } Eluze -- View this message in context: http://lilypond.1069038.n5.nabble.com/Bug-suspicion-with-figured-bass-tp135056p135057.html Sent from the Dev mailing list archive at Nabble.com. ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Bug suspicion with figured bass
Hi, Trying to apply some gracefully given code to handle exotic layouts (cf. Vertical text at the end of score messages on the user mailing-list), I found a strange behaviors while using figured bass. %%% endingText = #(define-music-function (parser location user-markup) (markup?) #{ \stopStaff \once \override TextScript #'staff-padding= #'() % allows text scripts "in the staff" \once \override TextScript #'padding = #-2% 2 to align with the lowest staff-line, ~3.5 to align with system brackets \once \override TextScript #'self-alignment-X = #left s64^\markup { \rotate #90 \fontsize #-3 \override #'(baseline-skip . 1.1) % varying depending on vertical spacing \override #'(line-width . 22) % varying depending on vertical spacing $user-markup } #}) \score { \new StaffGroup << \new Staff { R1 } \new Staff { R1 } \new Staff << \new Voice { \relative c'' { c2 c, } \bar "|." \endingText \markup { \justify-string #"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." } } \new FiguredBass { \figuremode { <_+>2 <1 2> } } >> >> \header { piece = good } } \score { \new StaffGroup << \new Staff { R1 } \new Staff { R1 } \new Staff << \figures { <_+>2 <1 2> } \relative c'' { c2 c, } \bar "|." \endingText \markup { \justify-string #"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." } >> >> \header { piece = "broken?" } } %%% -- Dominique ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Update contributors. (issue 6689045)
On Fri, Oct 19, 2012 at 10:36 AM, wrote: > I missed that Bertrand Bordage, Joe Neeman, and Carl D. Sorensen are > listed both under "developers" and "contributors". According to the > policy they should be removed from "contributors". Also Colin Hall is > listed under "developers" so probably should not be added under > "contributors: bug squad" like I did. > > The list of main developers looks rather long. Are there any "current > developers" to move to "previous developers" (e.g. they haven't been > around for a while)? depends on what you mean. I don't remember any commits from Jonathan Kulp, Mark Polesky, Carl Sorensen and Neil Puttock in past couple of months, but all of them send an email or two from time to time. Janek ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Update contributors. (issue 6689045)
I missed that Bertrand Bordage, Joe Neeman, and Carl D. Sorensen are listed both under "developers" and "contributors". According to the policy they should be removed from "contributors". Also Colin Hall is listed under "developers" so probably should not be added under "contributors: bug squad" like I did. The list of main developers looks rather long. Are there any "current developers" to move to "previous developers" (e.g. they haven't been around for a while)? Cheers, Julien http://codereview.appspot.com/6689045/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel