lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ottava: remove dashed line


From: Neil Puttock
Subject: Re: ottava: remove dashed line
Date: Sat, 21 Nov 2009 17:46:18 +0000

2009/11/20 David Kastrup <address@hidden>:

> Hm.  Sounds like somebody took a shortcut in the design that might be
> worth reexamining.

The OttavaBracket print callback predates the new(ish) line-spanner code.

It's perfectly possible to use ly:line-spanner::print, but it's not
really suited to rendering brackets: you have to add the bracket tips
as markup, which makes it difficult to change their direction
automatically.

\relative c'' {
  \override Staff.OttavaBracket #'stencil = #ly:line-spanner::print
  \override Staff.OttavaBracket #'bound-details =
    #`((left . ((Y . 0)
                (attach-dir . ,LEFT)
                (padding . 0)
                (stencil-align-dir-y . ,CENTER)))
       (right . ((Y . 0)
                 (padding . 0)
                 (attach-dir . ,RIGHT)
                 ;; ideally, draw-line should support dashed lines
                 (text . ,(make-draw-line-markup (cons 0 -1.2))))))
  \override Staff.OttavaBracket #'left-bound-info =
     #ly:line-spanner::calc-left-bound-info-and-text
  \override Staff.OttavaBracket #'right-bound-info =
     #ly:line-spanner::calc-right-bound-info
  \ottava #1
  c1
  c1
}

Regards,
Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]