lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating a stencil from a markup


From: Pierre Perol-Schneider
Subject: Re: Creating a stencil from a markup
Date: Thu, 15 Dec 2016 20:54:05 +0100

Ok.
Well I was just checking what's should be the best X-extent for this glyph 'cause the default one looks weird to me:

\markup
\center-column {
  \box
  \musicglyph #"scripts.caesura.curved"
   "|"
  \box
  \with-dimensions #'(0 . 1.23) #'(-0.75 . 1.24)
  \musicglyph #"scripts.caesura.curved"
   "|"
}

Cheers,
Pierre


2016-12-15 15:35 GMT+01:00 Simon Albrecht <address@hidden>:
On 15.12.2016 09:39, Pierre Perol-Schneider wrote:
Or simply:

\version "2.19"

{
  1
  \once\override Staff.BarLine.stencil =
    #(lambda (grob)
       (ly:stencil-combine-at-edge
         (ly:bar-line::print grob)
         1 ; y-axis
         1 ; on top
         (ly:stencil-aligned-to
           (grob-interpret-markup
             grob
             #{
               \markup
               \box % \box only for checking
               \with-dimensions #'(0 . 1.24) #'(-0.75 . 1.24)
               \musicglyph #"scripts.caesura.curved"
             #})
           X
           CENTER)

There is no need to fiddle with \with-dimensions, just adjust CENTER (which evaluates to 0) to any other value between -1 and 1 (I chose -.5), and/or adjust the ‘padding’ value in the following line (I use 1).

         2))
   1
}

Best, Simon


reply via email to

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