lilypond-user
[Top][All Lists]
Advanced

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

Re: Understanding the eps bounding box (rounding)


From: Urs Liska
Subject: Re: Understanding the eps bounding box (rounding)
Date: Fri, 2 Mar 2018 09:59:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0



Am 02.03.2018 um 09:16 schrieb Andrew Bernard:
Hi Urs,

Forgive me if saying something you know, but just confirming that PostScript user space coordinate units are 1/72 inch. This is close to one point, but there is no universally accepted definition of one point. Some conventions use 1/72.72 inches (!), for example.

OK, thank you. Although I was aware of that issue it seems I'll have to review the calculations.

So what you're saying is that when the EPS bounding box says "80" this means "80 times 1/72 inch", right?

According to https://tex.stackexchange.com/questions/8260/what-are-the-various-units-ex-em-in-pt-bp-dd-pc-expressed-in-mm#8337
- 1pt in LaTeX is 1/72.26999 inches.
- 1pb is 1/72.00082 inches. ("bp" refers to Big Points)

According to http://lilypond.org/doc/v2.19/Documentation/notation/distances-and-measurements
a LilyPond \pt is 1/72.27 inch, so obviously the LaTeX variant.

So obviously I do have to perform some transformations since my current assumption (the units in the bbox are equivalent to pt) produces slight offsets. But still I have to afterwards deal with the (annoying) issue that the bounding box is truncated to integers.



The information confirming this is on p 183 of the 3rd edition Postscript manual (same as the one Karl quotes from). [That manual is freely downloadable from Adobe.]

I don't know what 'bp' is, sorry, and I don't know what the size of a point ]\pt in LaTex is either.

I don't know if lilypond transforms Postscript user space coordinates into device space coordinates or when it does that. I thought GS would handle that late on, closer to final imaging.

Does anyone know at which stage this bounding box is calculated for the first time? And if there's any possibility to access that information from within LilyPond to write out a special logfile?
This would be very interesting for another reason: I would actually like to determint the amount of protrusion *to the right* too, and that is not possible for ragged systems.
The lower left corner is relative to the beginning of the staff symbol, so I will always know how much space is used to the left of that. But I can only infer the *right* protrusion from the difference between the upper right corner of the bounding box and the line width (which I know). When the system is justified this gives correct results but not when the system is ragged.

But maybe that's a separate question.

Best
Urs



Andrew



On 2 March 2018 at 18:26, Urs Liska <address@hidden> wrote:

I think it *is* the smallest box, but truncated to integers. At least I can't imagine a box that leaves full units empty.
From what I've seen so far I was confident that the numbers correspond to what LilyPond sees as \pt, and also in LaTeX I have treated the numbers as pt (as opposed to bp).



reply via email to

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