lilypond-devel
[Top][All Lists]
Advanced

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

Re: Where does paper-height come from?


From: Alexander Kobel
Subject: Re: Where does paper-height come from?
Date: Mon, 11 Jan 2010 22:52:52 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

address@hidden wrote:
Hi all,

I am playing with the vertical spacing algorithms, and am very
surprised by the behavior of "page-height".

Let's say for example that I set my paper to A6.  This, by ISO216, is
148mm high.
when calc-printable-height applies (ly:output-def-lookup layout
'paper-height), it ends up in Output_def::lookup_variable() and
ultimately in ly_module_lookup().  This does not return 148, but
84.22!!! [...]

Hi.

Are you aware of the units? I'm not at all, and neither did have a look in the code, but 84.22 is suspiciously near to 148 / (7/4), where the parenthesized term is 7 mm per 4 staff units, which is (not considering rounding errors) the default global staff size. More accurate: I think LilyPond uses a pt size of 1/72.27 in, so a staff (with four staff units) has height 20*25.4/72.27 mm = 7.0292 mm, and 148 / (7.0292 / 4) = 84.22 to a precision of three digits.

So I'm quite sure that the output of output-def-lookup is in global staff size units, not in mm, and a conversion happening somewhere hidden in the code, and not specifically for page-height.


HTH,
Alexander




reply via email to

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