lilypond-user
[Top][All Lists]
Advanced

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

Possible bug in lyrics mode


From: Arle Lommel
Subject: Possible bug in lyrics mode
Date: Tue, 13 Jul 2010 10:48:23 -0400

Hi all,

Just thought I'd mention something I believe to be a bug in lyrics mode, but 
thought I'd ask if there is a rationale for it before I submit.

I found this a few weeks ago and got a workaround thanks to the list, but it 
was a bit of a pain and I can't help but think this is a bug.

Line height for lyrics (at least in 2.13.24) is determined by the postscript 
bounding box for the characters in the line (or at least that's what it seems), 
*not* the em-square, which is the basic unit for almost all typographic 
measurements. This means that if a line has no descenders (j, p, or y), it 
loses height at the bottom and the next line will sit closer to it that it 
would if that line contained descenders. Similarly, if the line contains no 
ascenders (which is, admittedly, unlikely, but certainly not impossible), the 
spacing between lines is figured from the x-height of the text rather than the 
cap height. As a result the visual spacing between lines can be very uneven, 
with some lines closer to each other than to other ones and very irregular 
appearance.

The following image shows the problem. The dotted red lines show even spacing, 
but you can see that Lilypond’s output is nowhere near even. The problem is the 
third line, which lacks descenders, thus forcing the fourth line to sit too 
close to it:

PNG image

I would argue that the layout engine should work based on the em-square of the 
font, which would result in consistent and predictable spacing. The way it is 
in 2.13.24 though is essentially unpredictable since you can’t know what the 
output is unless you know in advance what the lyrics text will be.

Before I file it as a bug, though, I would like to know if there is a reason to 
base the line height on the postscript bounding boxes of the text.

-Arle

reply via email to

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