lilypond-user
[Top][All Lists]
Advanced

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

Re: Drawing boxes around grobs


From: Thomas Morley
Subject: Re: Drawing boxes around grobs
Date: Sat, 8 Feb 2020 21:06:18 +0100

Am Sa., 8. Feb. 2020 um 19:26 Uhr schrieb Paolo Prete <address@hidden>:
>
> Hello,
>
> The documentation shows this example:
>
> \override TextScript.stencil = #(make-stencil-boxer 0.1 0.3 
> ly:text-interface::print) c'4^"foo"
>
> (http://lilypond.org/doc/v2.19/Documentation/snippets/tweaks-and-overrides)
>
> Is it possible to adapt it for other grobs too? I would like to use it for 
> TupletBracket, OttavaBracket, Notehead and Script, but it seems that it works 
> for TextScript only
>
> Thanks!
> P

Afaict, it works for all grobs with a stencil.
Sometimes you will have to deal with undesired side-effects though.

{
\override TextScript.stencil =
  #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)

\override Script.stencil =
  #(make-stencil-boxer 0.1 0.3 ly:script-interface::print)

\override NoteHead.stencil =
  #(make-stencil-boxer 0.1 0.3 ly:note-head::print)
  c'4^"foo"->

\override TupletBracket.stencil =
  #(make-stencil-boxer 0.1 0.8 ly:tuplet-bracket::print)
  \tuplet 3/2 { b4 4 4 }
}

The boxed NoteHead is wider, the stem-attachment does as before, i.e.
the Stem is placed at the border...
In this case tackle stem-attachment or better, don't let the boxed
stencil be wider. Which may lead to probably unwished collisions, if
done for with grobs.

Cheers,
  Harm



reply via email to

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