lilypond-user
[Top][All Lists]
Advanced

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

Re: Chinese punctuation in Lyric mode


From: Werner LEMBERG
Subject: Re: Chinese punctuation in Lyric mode
Date: Tue, 05 Mar 2013 08:50:18 +0100 (CET)

>> I've attached the output PDF.  I hope it's possible to make the
>> horizontal alignment of verses 2 and 3 to be the same as that of
>> verse 1, i.e. treat , and 、 the same as normal commas.
> 
> the problem is that the *visible* width (i.e., the black stuff) is
> not the same as the actual width.

Exactly.  Lilypond doesn't know anything about punctuation, and
indeed, the shift to the left is very small for non-CJK glyphs like
`,' or `.' and thus not needed.

I think it should be possible to write a Scheme solution which filters
the lyrics string attached to a note head, applying some horizontal
offset if the final character is a fullwidth punctuation mark like `,'
or `、' (and others).  It probably works to replace the callback

  (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)

in the LyricText grob with another callback.  Note that for the CJK
fullstop character `。', there are different typesetting traditions in
Japan and China: The former positions it at the lower left of the CJK
fullwidth box, while in China it usually gets centered in the box.

Hopefully, our Scheme gurus can give you more advice (and probably
even help with an implementation).


    Werner



reply via email to

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