For the already mentioned draw-dashed-line-markup one can specify full-length 
#f to insist on the given on/off-values.

In the code below I added such a markup with full-length #f, on 0.8, off 8. 
(It's red colored.)
Which mimics the settings for dash-fraction/period in your initial example.
The markup is moved in order to start exactly where the default 
dashed-text-spanner-line starts. Values for that are calculated based on the 
spanner-stencil values. See the commented code for ly:stencil-expr.

~~~
\relative c' {
  \override TextSpanner.dash-period = #8
  \override TextSpanner.dash-fraction= #0.1
  
  \override TextScript.color = #red
  
%  \override TextSpanner.after-line-breaking =
%  #(lambda (grob)
%    (pretty-print
%      (ly:stencil-expr (ly:grob-property grob 'stencil))))

  <>^\markup 
        \translate #'(2.913177952755998 . 0)
        \override #'(full-length . #f)
        \override #'(on . 0.8)
        \override #'(off . 8)
        \draw-dashed-line #'(14.1179170455133 . 0)
        
  \override TextSpanner.bound-details.left.text = "im"
  e1\startTextSpan e1 e1\stopTextSpan

  <>^\markup 
        \translate #'(6.839658267716501 . 0)
        \override #'(full-length . #f)
        \override #'(on . 0.8)
        \override #'(off . 8)
        \draw-dashed-line #'(10.1914367305527 . 0)
        
  \override TextSpanner.bound-details.left.text = "immer"
  e1\startTextSpan e1 e1\stopTextSpan
}
~~~

Attached the output image.

I think something like the red markup should never become the default.
Even as an option - - - why?

Ok, I _had_ coded that full-length-true/false-option in the markup myself.
But this was pure paranoia ... 

Though, I'm afraid implementing such an option into TextSpanner.stencil would 
mean C++-work. So I can't do it myself.




Attachments:

- 
[atest-92.png](https://sourceforge.net/p/testlilyissues/issues/_discuss/thread/f24505bf3a/807a/8ae8/attachment/atest-92.png)
 (8.4 kB; image/png)


---

** [issues:#5539] TextSpanner: left text incorrectly influences dashes**

**Status:** New
**Created:** Sat Jul 20, 2019 08:17 AM UTC by Werner LEMBERG
**Last Updated:** Sat Jul 20, 2019 09:17 PM UTC
**Owner:** nobody
**Attachments:**

- 
[text-spanner-wrong-dash-spacing.png](https://sourceforge.net/p/testlilyissues/issues/5539/attachment/text-spanner-wrong-dash-spacing.png)
 (4.6 kB; image/png)


[git commit 49f41bf1c64ae1e2490571e73a85cbc4b2a9fb27]

~~~~
\version "2.21.0"

\header { texidoc = "
  For a text spanner, the length of the (left) text element
  must not influence the distance between and the length of
  dashes.

  Here is a counterexample.
" }

\relative c' {
  \override TextSpanner.dash-period = #8
  \override TextSpanner.dash-fraction= #0.1

  \override TextSpanner.bound-details.left.text = "im"
  e1\startTextSpan e1 e1\stopTextSpan

  \override TextSpanner.bound-details.left.text = "immer"
  e1\startTextSpan e1 e1\stopTextSpan
}
~~~~



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/testlilyissues/issues/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/testlilyissues/admin/issues/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Testlilyissues-auto mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto
  • [Lilypond-... Auto mailings of changes to Lily Issues via Testlilyissues-auto
    • [Lily... Auto mailings of changes to Lily Issues via Testlilyissues-auto
    • [Lily... Auto mailings of changes to Lily Issues via Testlilyissues-auto

Reply via email to