The Page Bounding Box does not take into account the following tags (and possibly more):
\tempo tag
\intes tags
dynamic tags such as \cresc and \dim
\text tags
As a result these elements are ignored and the bounding box is incorrect.
Check the following score as an example in GuidoEditor, enable the Page Bounding Box in preferences and see its overlap with the \tempo
tag as an example.
Once you get here, here's another very strange behavior regarding Page Bounding Box. It seems like
\intens
tag significantly increases Page Bounding Box if they are on the last note of a measure, and not on other notes!Observe the bounding boxes on these two scores:
Strange one:
Regular one despite the fact that Intensities are ignored (and should be included):
You can use this last one as unit test! :)
The page bounding box is used by the line breaking algorithm, that's why it encloses only the notes. You should include the page margins to get the whole page content. Is it a solution in your case?
By increasing the page margin the problem is partially solved but not entirely. In our case, each page includes only one system and we tighten them so that several pages would fit into one screen.
If I increase the margin, then there'd be too much distance between systems but so far we have found a compromise.
Note that this is only because we do a ResizePageToMusic that re-evalutes the Height of the page which apparently does not take into account
\text
tags and also\intense
tags and wedges.I'll see how we can overcome this but if there was a way to take into account those tags it would be wonderful OR if there's a different approach we'd definitely go for it.
The strange thing is that with the GuidoEditor (which I'm always using with ResizePageToMusic set to on) I don't get this problem. There must be another reason. Do you draw directly to screen or do you have an offscreen + copy to screen ?