lilypond-user
[Top][All Lists]
Advanced

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

Re: scaling problem


From: Werner LEMBERG
Subject: Re: scaling problem
Date: Sat, 04 Aug 2007 00:40:31 +0200 (CEST)

> > 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
}

PNG image


reply via email to

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