lilypond-user
[Top][All Lists]
Advanced

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

Re: Font size of pedal marks


From: tisimst
Subject: Re: Font size of pedal marks
Date: Fri, 19 Feb 2016 11:57:38 -0700 (MST)


On Fri, Feb 19, 2016 at 11:40 AM, Kieren MacMillan [via Lilypond] <[hidden email]> wrote:
If you have more than one tweak, you can also pack them into a single/general setting, without redefining them individually:

%%%%  SNIPPET BEGINS
\version "2.19.36"

#(define ((custom-script-tweaks ls) grob)
  (let* ((type (ly:prob-property (assoc-ref (ly:grob-properties grob)
'cause) 'articulation-type))
         (tweaks (assoc-ref ls type)))
    (if tweaks
        (for-each (lambda (x) (ly:grob-set-property! grob (car x)
(cdr x))) tweaks)
        '())))

#(define my-script-settings '(
   ("rheel" . ((font-size . -3)))
   ("lheel" . ((font-size . 4)))
   ("staccato" . ((padding . 12)))
   ("tenuto" . ((X-offset . -2)))
   ))

\score {
  \new Staff { c''4\rheel 4\lheel 4\staccato 4\tenuto }
  \layout {
    \context {
      \Score
      \override Script.before-line-breaking =
          #(custom-script-tweaks my-script-settings)
    }
  }
}
%%%%  SNIPPET ENDS

Nice, Kieren! That's a great way to consolidate specifics tweaks! Thanks for sharing!

- Abraham 


View this message in context: Re: Font size of pedal marks
Sent from the User mailing list archive at Nabble.com.

reply via email to

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