On 1 August 2010 09:40, Mike Solomon <mike...@ufl.edu> wrote: > I'm working on a piece where the thickness of a text spanner represents > playing intensity, and in writing it, I'm realizing that the thickness of > text spanners has an effect on their X extents (see the minimal example > below). This is due (I think) to the round-cap line ending. I would gladly > use non-rounded lines so that they stop consistently at the same horizontal > spot independent of their thickness. Before I dive into my git repository > to cobble together a solution, if any of you know a way to get around this > problem by standardizing the horizontal lengths of text spanners, I'd > appreciate it!
I think the simplest way around this is to emend the drawing routine to remove the round-cap ending. Unfortunately, the extent box assumes the line's rounded, so there's a hard-coded widening in line-interface.cc. Your best bet is to change the default X-extent callback to remove it: \override TextSpanner #'X-extent = #(lambda (grob) (let ((thick (* (ly:grob-property grob 'thickness) (ly:staff-symbol-line-thickness grob))) (ext (ly:grob::stencil-width grob))) (interval-widen ext (/ thick -2)))) Cheers, Neil _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user