Using arbitrary markup as lyric hyphen: Difference between revisions
m Lemzwerg moved page Using any arbitrary markup as LyricHyphen to Using arbitrary markup as lyric hyphen without leaving a redirect |
m Remove outdated comments |
||
| Line 1: | Line 1: | ||
Lyric hyphens have several user-modifiable properties such as length and thickness; this doesn’t allow, however, for further tweaking, for example, rendering hyphens as rounded boxes to better match the font possibly used for <code>LyricText</code>, or even printing hyphens as actual glyphs rather than drawing basic boxes. | Lyric hyphens have several user-modifiable properties such as length and thickness; this doesn’t allow, however, for further tweaking, for example, rendering hyphens as rounded boxes to better match the font possibly used for <code>LyricText</code>, or even printing hyphens as actual glyphs rather than drawing basic boxes. | ||
This snippet rewrites the <code>LyricHyphen</code> stencil procedure to use a proper | This snippet rewrites the <code>LyricHyphen</code> stencil procedure to use a proper glyph – or indeed any arbitrary markup. | ||
<lilypond version="2.24" | <lilypond version="2.24"> | ||
% Originally contributed by Aaron Hill: | |||
% https://lists.gnu.org/archive/html/lilypond-user/2019-03/msg00257.html | |||
#(define (lyric-hyphen-text-stencil grob) | #(define (lyric-hyphen-text-stencil grob) | ||
| Line 95: | Line 95: | ||
Lo -- rem ip -- sum do -- lor sit a -- met. | Lo -- rem ip -- sum do -- lor sit a -- met. | ||
\mark \markup { "LyricHyphen.text is " \circle \with-color #red "♥" } | |||
\mark \markup { "LyricHyphen.text is " \circle | \override LyricHyphen.text = \markup \circle \with-color #red "♥" | ||
\override LyricHyphen.text = | |||
\override LyricText.font-size = #3 | \override LyricText.font-size = #3 | ||
Lo -- rem ip -- sum do -- lor sit a -- met. | Lo -- rem ip -- sum do -- lor sit a -- met. | ||
\mark \markup { "LyricHyphen.text is blue" \with-color #blue #"≋" } | \mark \markup { "LyricHyphen.text is blue" \with-color #blue #"≋" } | ||
\override LyricHyphen.text = | \override LyricHyphen.text = | ||
\markup | \markup \scale #'(3 . 1) \with-color #blue #"≋" | ||
\override LyricText.font-size = #6 | \override LyricText.font-size = #6 | ||
Break -- ing | Break -- ing | ||