On 2018-10-20 2:51 pm, David Kastrup wrote:
Torsten Hämmerle <[email protected]> writes:
The only thing I do not like about staff-padding is that, strictly
speaking,
we'd need different values for up and down direction:
Above the stave, just the descenders go between stave and text
baseline,
whereas below the stave, the baseline has to be sufficiently far away
from
the stave so that there's enough space for the full text height:
<http://lilypond.1069038.n5.nabble.com/file/t3887/staff-padding.png>
Wouldn't it be nice to have staff-padding accept a pair of values?
Anything wrong with using a callback?
%%%%
\version "2.19.82"
{
\override TextScript.staff-padding = #(lambda (grob)
(let ((dir (ly:event-property (event-cause grob) 'direction)))
(if (> dir 0) 2.5 3.5)))
g' _"g" ^"q"
g' _"b" ^"b"
}
%%%%
Semi-related question... Are there cases when you cannot use a callback?
Or is it always the case that any property can be a callback?
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user