Le 30/01/2022 à 22:20, Simon Albrecht a écrit :
Hi List,
is there an equivalent to self-alignment-X for the left bound text of
a DynamicTextSpanner? See below.
Best, Simon
\version "2.23.5"
{
1-\tweak self-alignment-X 1 \fff
1
% this causes alignment to just fail indiscriminately
% (not a surprise, because I couldn’t find out how to use this
property)
%-\tweak left-bound-info.self-alignment-X 0
% this is simply an offset against the default placement (default
#'(-.75 . -.5))
%-\tweak bound-details.left.stencil-offset #'(-3 . 0)
% I’m not sure what this does at all
%-\tweak bound-details.left.attach-dir -3
\cresc
1
1
1
1\!
}
To explain the behavior with left-bound-info: this is an
internal property that gets populated with values from
bound-details and values computed automatically. If you
override a subproperty, since callbacks aren't supported
for subproperties, you just override the calculation of
this property from bound-details and logic, and there
is nothing in it but the suboverride you have done.
Then it's not surprising that everything starts going
wrong.
To answer the question: attach-dir is the equivalent of
parent-alignment-X, controlling where on the note head
(left, center, right, intermediate values) the reference
point of the text goes. There is no direct equivalent
for self-alignment-X, but you can do
\version "2.22.1"
{
1-\tweak self-alignment-X 1 \fff
1\tweak bound-details.left.text \markup \general-align #X #0 "cresc."
\cresc
1
1
1
1\!
}
Best regards,
Jean