> > However, I wasn't able to adjust
> > the extra-offset parameter in a scaled way.  Can you help?
> 
> extra-offset is scaled by the staff-space of the StaffSymbol, so you
> should be able to use \tweak with extra-offset for \vbracket.

Hmm, have a look at the attached image.  Something doesn't work as
expected...

Is it possible that there is still some vertical space inserted
somewhere?  I tried to set both `padding' and `staff-padding' to zero
(using \tweak), but this has no effect.

In general, it would be great to have a `\scaledMarkup' command which
takes the size of the staff into account to which the markup is
attached.


    Werner


======================================================================


#(define-markup-command (vbracket layout props vsize xoff)
                        (number? number?)
  "A left vertical bracket."
  (let* ((mag (magstep (chain-assoc-get 'font-size props 0)))
         (vb (interpret-markup
              layout
              props
              (markup #:stencil (ly:stencil-translate
                                 (ly:bracket Y (cons 0 (* mag vsize))
                                             (* mag 0.2) (* mag 1))
                                 (cons (* mag xoff) 0))))))
    vb))

\new Staff \with {
  fontSize = #-6
  \override StaffSymbol #'staff-space = #(magstep -6)
}
{
  c''-\tweak #'extra-offset #'(0 . 6)
     -\markup \vbracket #5 #2
}

\new Staff \with {
  fontSize = #-3
  \override StaffSymbol #'staff-space = #(magstep -3)
}
{
  c''-\tweak #'extra-offset #'(0 . 6)
     -\markup \vbracket #5 #2
}

{
  c''-\tweak #'extra-offset #'(0 . 6)
     -\markup \vbracket #5 #2
}

<<inline: scaled-markup.png>>

_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to