]> git.donarmstrong.com Git - lilypond.git/commit
Issue 2245: always align dynamics and lyrics on "main" notehead
authorJanek Warchoł <lemniskata.bernoullego@gmail.com>
Wed, 27 Mar 2013 16:20:03 +0000 (17:20 +0100)
committerJanek Warchoł <lemniskata.bernoullego@gmail.com>
Tue, 8 Jul 2014 07:16:58 +0000 (09:16 +0200)
commit59a842eba0f7ad78289a58a7dfa8fa786cdf11ed
tree1b2525344fe3bf237d37dee13bcd50a03de9ebda
parent2136af10e78c87e569199091c206f96687841651
Issue 2245: always align dynamics and lyrics on "main" notehead

Until now, LyricTexts and DynamicTexts had their X-parents set to
the first NoteHead in the NoteColumn.  This resulted in inconsistent
alignment - placement of lyrics and dynamics depended on the order
of notes in the input:

% this was aligned differently
{ <f' g'>1\p <g' f'>\p }
\addlyrics { la la }

By using NoteColumns themselves as the X-parents, we make sure that
the input order won't matter.  Since the NoteColumn contains all NoteHeads
(including suspended ones, which usually should be ignored when aligning),
as well as Flags and some other objects, we cannot use its X-extent directly -
instead, we add a function for calculating X-extent of the "main" part of the
NoteColumn, i.e. X-extent of the non-suspended NoteHeads (represented by the
NoteHead furthest away from the stem).
input/regression/input-order-alignment.ly [new file with mode: 0644]
lily/dynamic-engraver.cc
lily/include/note-column.hh
lily/lyric-engraver.cc
lily/note-column.cc
lily/self-alignment-interface.cc
scm/define-grob-properties.scm
scm/define-grobs.scm