On Thu, Sep 7, 2023 at 5:44 PM Jean Abou Samra <j...@abou-samra.fr> wrote:
> Le jeudi 07 septembre 2023 à 17:31 -0400, brin solomon a écrit : > > I'm using a modified version of this LSR snippet > > https://lsr.di.unimi.it/LSR/Item?id=900 to re-engrave a historical > score that > > uses a curly-style bass clef. The clef shape is a little wider than a > standard > > bass clef, and this means that it sometimes collides with notes and > rests when > > used in actual music. After looking at the internals manual, I want to > try > > adjusting the horizontal-skylines property, but I can't find any > documentation > > on what a "pair of skylines" should look like (as opposed to a boolean, > pair > > of numbers, etc). Can anyone point me in the right direction so I can > give > > this custom clef a little more space? Is there a different approach that > would > > be better here? > > A skyline pair is, well, a pair of skylines. (In current versions, anyway; > there > used to be special "skyline pair" objects, but now they're plain normal > Scheme > pairs of skylines.) And if you want to visualize what a skyline is, you > can do > > \layout { > \context { > \Score > \override Clef.show-horizontal-skylines = ##t > \override Clef.show-vertical-skylines = ##t > } > } > > > to see that they're basically object outlines in a given direction. > You can construct them with functions like > > ly:make-skylines > ly:skylines-for-stencil > ly:skyline-pad > > of which the documentation is at > > https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions > > With that being said, this will be inconvenient; I think it would > be much simpler to just add the padding to your shape itself. > (For example, construct it as \markup \with-dimensions #... #... \path ...) > > Jean > > Hi Jean, Thanks for the quick response! I'm always happy to do something simpler, but I admit that I'm a bit at a loss as to how to convert the linked snippet to the construct you described. The snippet stores the \path for the clef in a variable ("my-clef") and then sets is at the stencil for the bass clef using a layout block like this: \layout { \context { \Score \override Clef.stencil = #(lambda (grob) (let* ((sz (ly:grob-property grob 'font-size 0)) (mlt (magstep sz)) (glyph (ly:grob-property grob 'glyph-name))) (cond ((equal? glyph "clefs.F") (ly:stencil-scale my-clef (* 1 mlt) (* 1 mlt))) ((equal? glyph "clefs.F_change") (ly:stencil-scale my-clef (* .8 mlt) (* .8 mlt))) (else (ly:clef::print grob))))) } } Where in that block would I indicate that kind of extra padding? Thanks, brin