Le 13/01/2023 à 10:16, Werner LEMBERG a écrit :
I just discovered this huge bug in the recent release of 2.24.0
which wasn't in the previous version.
What previous version did you test this with? For me, the output is
the same in 2.22 and in 2.18.2.
Regardless of that, it is indeed a severe bug: No need to ever align
key signatures vertically, AFAIK.  Simply left-align them.


Do you mean like this, or something else?

(NB this is unreliable code, I was surprised that it even works)

\version "2.24.0"

music = \relative c' {
  \override Staff.KeyCancellation.break-align-symbol = #'key-signature
  \override Staff.KeySignature.X-offset =
    #(lambda (grob)
       (let* ((parent (ly:grob-parent grob X))
              (elts (ly:grob-object parent 'elements))
              (can (find (lambda (g)
                           (and (grob::has-interface g 'key-cancellation-interface)
                                (eq? (ly:grob-object g 'staff-symbol)
                                     (ly:grob-object grob 'staff-symbol))))
                         (ly:grob-array->list elts))))
         (when can
           (ly:grob-translate-axis!
            grob
            (+ (- (interval-end (ly:grob-extent can parent X))
                  (ly:grob-relative-coordinate grob parent X))
               0.7)
            X))))
  \key es\major
  c d e f
  \key c\major
  c d e f
  \key as\major
  c d e f
  \key bes\major
  c d e f
}

\new StaffGroup <<
  \transpose c a {
    \music
  }
  \new Staff
  \transpose c g {
    \music
  }
  \new Staff
    \music
>>


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to