Hi everyone,

I've experienced that in certain situations, when notes with accidentals
are tied, the accidental grobs have stencils that seem to be hidden (not
shown but occupy space) which creates very awkward spacing.

I made this snippet to showcase this:

> \version "2.19.80"\language "english"
> \paper {
>   ragged-right = ##t}
> %Tied accidentals have the same placement as the untied ones,
> %even though that with ties there should be less grobs occupying space\score {
>   \relative c'' {
>     <cs gs>1 <es cs gs cs,> \break
>     <cs gs>~ <es cs gs cs,> \break
>     <es cs>~ <es cs gs cs,> \break
>     <cs cs,>~ <es cs gs cs,> \break
>   }
> }
> %Checking that there are accidental grobs for each notehead\score {
>   \relative c'' {
>      <cs cs,>~
>     \override Accidental.before-line-breaking =
>     #(lambda (grob)
>        (pretty-print grob))
>     <es cs gs cs,>
>     %Output:
>     %#<Grob Accidental >
>     %#<Grob Accidental >
>     %#<Grob Accidental >
>     %#<Grob Accidental >
>     %Showing there are 4 accidental grobs instead of only the required 2
>   }
> }
> %Deleting the tied accidentals "fixes" placement, shouldn't this be 
> default?\score {
>   \relative c'' {
>      <cs cs,>~
>     \override NoteColumn.before-line-breaking =
>     #(lambda (nc)
>        (let* ((nhds (ly:grob-array->list (ly:grob-object nc 'note-heads)))
>               (accs
>                 (filter ly:grob?
>                   (map
>                    (lambda (nhd)
>                      (ly:grob-object nhd 'accidental-grob))
>                    nhds)))
>               (stils
>                (list
>                  ly:accidental-interface::print
>                  #f
>                  ly:accidental-interface::print
>                  #f)))
>          (for-each
>           (lambda (acc stil)
>             (ly:grob-set-property! acc 'stencil stil))
>           accs
>           stils)))
>     <es cs gs cs,>
>   }
> }
>
>
>
I'm fairly confident that the accidental grobs shouldn't be taking up space
in those cases. But maybe this is intended by design and I'm failing to see
it's use.

So, is this a bug?
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to