On Mon, Jun 22, 2009 at 9:25 AM, Bertalan Fodor (LilyPondTool)<lilypondt...@organum.hu> wrote: > I'd like to dig myself into the C++ source of LilyPond. > I have a long-wished feature, for support automatic lyric contraction. > That means the following: > When there is not enough space for a hyphen to appear, the hyphen is > removed. Like instead of "yeah - yeah - yeah", "yeah yeah yeah". In these > cases I would like LilyPond to automatically contract it to "yeahyeah - > yeah", moving the syllables, taking kerning into account. > > Do you think it is feasible without major rewrite? I do see some callback to > the lyric syllable in the hyphen engraver, but I'm not sure about it.
I think it would be a difficult to implement. You'd have to replace the hyphen code and write code that checks the distance between this syllable and the next; if that distance is too small, it would remove or make transparent the following syllable, and change the text of the 1st to be the contracted version. There are some other hairy issues: in general, any contraction can change the spelling of a word, so what happens if you have a - b - c - d - e and it is set very tightly? Any contraction change the spelling of any syllable (and the space it takes up), so how do you decide between contracting aB - c - d - e and a - b - Cd - e first? the changed spelling may alter the size of the word, and may trigger another round of contractions. -- Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel