[Top][All Lists]

[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 08:26:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Hello Karl,

Am 02.03.2018 um 01:25 schrieb address@hidden:
In my

  PostScript Language
  Document Structuring
  Conventions Specification
  Adobe Developer Support
  Version 3.0
  25 September 1992

possible downloadable from

it says:

%%BoundingBox: { <llx> <lly> <urx> <ury> } | (atend)
                <llx> ::= <int>                       (Lower left x coordinate)
                <lly> ::= <int>                       (Lower left y coordinate)
                <urx> ::= <int>                       (Upper right x coordinate)
                <ury> ::= <int>                       (Upper right y coordinate)
                This comment specifies the bounding box that encloses all marks 
                on all pages of a document. That is, it must be a "high water 
mark" in all
                directions for marks made on any page. The four arguments 
correspond to
                the lower left (llx, lly) and upper right corners (urx, ury) of 
the bounding box
                in the default user coordinate system (PostScript units). See 
also the
                %%PageBoundingBox: comment.

I.e., according to spec, the numbers describe a box that encloses
everything. It doesn't say it must the smallest such box.
Same thing for PageBoundingBox.

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).

Could this be an issue here?

That is in contrast to:

PostScript language reference manual, 3rd ed, TABLE 5.3:

FontBBox array (Required) An array of four numbers in the glyph coordinate 
system giving
                the left, bottom, right, and top coordinates, respectively, of 
the font bounding
                box. The font bounding box is the smallest rectangle enclosing 
the shape that
                would result if all of the glyphs of the font were placed with 
their origins co-
                incident, and then painted. This information is used in making 
                about glyph caching and clipping. If all four values are 0, the 
PostScript inter-
                preter makes no assumptions based on the font bounding box.

where they specify the smallest one, but for fonts and other
parts of pages, not whole pages.

Interestingly, here they don't specify the data type of the numbers.

Does the -80 mean:

   * any value between -79 and -80
   * any value between -79.5 and -80.4999999

So, if the leftmost painted things is at e.g. -79.1 then llx <= -80,
since llx >= -79 wouldn't do.

Thank you. This makes sense but is exactly the kind of assumption I didn't want to approach by trial & error.


/Karl Hammar

Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
+46 173 140 57

lilypond-user mailing list

reply via email to

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