lilypond-user
[Top][All Lists]
Advanced

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

Re: UTF-8-aware backwards string searching in Guile, or: fixing centered


From: Aaron Hill
Subject: Re: UTF-8-aware backwards string searching in Guile, or: fixing centered lyrics ignoring punctuation
Date: Tue, 30 Oct 2018 21:43:19 -0700
User-agent: Roundcube Webmail/1.3.6

On 2018-10-30 9:23 pm, Aaron Hill wrote:
Here's a quick-n-dirty patch to address the issue.

%%%%
\version "2.19.82"
\include "center-lyrics-ignoring-punctuation.ily"
{ d'4 4 4 }
\addlyrics { Å Ɓ† «Ḉ…» }
%%%%

Agh, I goofed. I forgot the logic is that you want to trim the "space" characters from the ends only. Anything included within the "word" is okay.

So with two drop-whiles and reverses, here's the patch to my patch, including a new test document:

%%%%
\version "2.19.82"
\include "center-lyrics-ignoring-punctuation.ily"
{ d'4 4 4 4 }
\addlyrics { Å Ɓ† «Ḉ…» ?Ḓ—Ḛ }
%%%%

-- Aaron Hill

Attachment: center-lyrics-ignoring-punctuation.ily
Description: Text document

Attachment: utf8.cropped.png
Description: PNG image


reply via email to

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