]> git.donarmstrong.com Git - lilypond.git/commit - input/regression/dynamics-text-right-padding.ly
Fix DynamicTextSpanner left alignment.
authorNeil Puttock <n.puttock@gmail.com>
Fri, 15 Jan 2010 00:02:23 +0000 (00:02 +0000)
committerNeil Puttock <n.puttock@gmail.com>
Fri, 15 Jan 2010 00:02:23 +0000 (00:02 +0000)
commitb0ceb64701c0418fb074b6823cad1c682cefe76a
tree1afe095d3307c5817c254aa1fe2b959995534e53
parent03be44b1a82407c0079f02d9f6b533982bebd714
Fix DynamicTextSpanner left alignment.

When a DynamicTextSpanner directly follows a DynamicScript, padding is
required to ensure the 'left 'text doesn't collide with the
dynamic sign.  Unfortunately, this default value skews the
spanner's left bound to the right when no dynamic script is present.

This patch caters for both situations by resetting 'left 'padding
and 'left 'attach-dir as required, adding extra padding read from the
property 'right-padding to fine-tune the space between the text elements.

* add regtests demonstrating 'right-padding and correct alignment

* remove hard-coded 'bound-details setting in New_dynamic_engraver, which
  prevented user override

* add dynamic-text-interface with user property 'right-padding

* add 'before-line-breaking callback dynamic-text-spanner::before-line-breaking
  which checks whether the left bound is a DynamicText; if this is true,
  set nested properties 'left 'attach-dir/'padding to prevent collision
input/regression/dynamics-text-left-text-alignment.ly [new file with mode: 0644]
input/regression/dynamics-text-right-padding.ly [new file with mode: 0644]
lily/new-dynamic-engraver.cc
scm/define-grob-interfaces.scm
scm/define-grobs.scm
scm/output-lib.scm