[Top][All Lists]

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

Re: Where does paper-height come from?

From: b1
Subject: Re: Where does paper-height come from?
Date: Mon, 11 Jan 2010 18:34:41 -0500
User-agent: Webmail 5.0

Thanks Alexander,

This does indeed look suspiciously close to the truth. But which part of the code might do this conversion? I looked at the level of raw module-define! and ly_module_lookup(), I do not see how these can contain any conversion code?

Quoting Alexander Kobel <address@hidden>:
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!!! [...]

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.


reply via email to

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