[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I read/use properties of LyricText while processing LyricHyp
From: |
Knut Petersen |
Subject: |
Re: How can I read/use properties of LyricText while processing LyricHyphen? |
Date: |
Thu, 6 Oct 2016 12:10:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
Am 06.10.2016 um 11:04 schrieb Simon Albrecht:
Hi Knut,
thanks for taking this on!
On 06.10.2016 09:11, Knut Petersen wrote:
To solve issue 1255 I added a "use-markup" and a "text" property to LyricHyphen
and changed lyric-hyphen.cc
to use Text_interface::print if the use-markup property is true.
I’d prefer to have an alternative stencil procedure available (so one would
choose between e.g. ly:lyric-hyphen::print-graphic and
ly:lyric-hyphen::print-text)
That's also a possibility. But then I think it would be better to keep the old
name for the default rounded-box hyphen and
ly:lyric-hyphen::print-text for the now code.
instead of creating a new property. That would seem more semantically
appropriate.
Also, shouldn’t it suffice to add text-interface to LyricHyphen, instead of
manually adding a ‘text’ property?
Yes, I also added text-interace to LyricHyphen, but a default value for text
"-" needs to be defined somewhere:
(LyricHyphen
. (
(after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
(dash-period . 10.0)
(height . 0.42)
(length . 0.66)
(minimum-distance . 0.1)
(minimum-length . 0.3)
(padding . 0.07)
(springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
(stencil . ,ly:lyric-hyphen::print)
(text . "-")
(vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
(thickness . 1.3)
(Y-extent . (0 . 0))
(meta . ((class . Spanner)
(interfaces . (font-interface
lyric-hyphen-interface
lyric-interface
spanner-interface
text-interface))))))
Cheers,
Knut