Harm,
On Mon, Apr 14, 2014 at 12:07 PM, David Nalesnik <[email protected]>wrote: > > > On Mon, Apr 14, 2014 at 8:53 AM, David Nalesnik > <[email protected]>wrote: >> >> >> I can't figure out where that 1.1 comes from, though. >> >> > This happens in accidental-placement.cc. It's the value of width > calculated in position_apes. Looks like it doesn't factor in the offsets > to the accidentals. > Yes, this appears to be the culprit leading to the incorrect values from 'X-extent (and calling ly:grob-extent). Would you mind trying out the attached patch to see if it works in whatever context you need AccidentalPlacement info for? With your example, I get the same values as with 2.16.2, except in the case of the five-note chord. The accidentals in later releases are spaced closer, presumably as a result of skyline work. --David
From f21d3853c6a590334848664cdcdceaf592ea9ecc Mon Sep 17 00:00:00 2001 From: David Nalesnik <[email protected]> Date: Mon, 14 Apr 2014 16:54:43 -0500 Subject: [PATCH] Fixes calculation of X-extent of AccidentalPlacement. Previously, the offsets involved in staggering of accidentals was not included in the calculation of the width of AccidentalPlacement grobs. --- lily/accidental-placement.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index f954def..6fa61e9 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -418,7 +418,7 @@ position_apes (Grob *me, { Real mh = ape->horizontal_skylines_[d].max_height (); if (!isinf (mh)) - width.add_point (mh); + width.add_point (mh + offset); } last_offset = offset; -- 1.7.0.4
_______________________________________________ bug-lilypond mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-lilypond
