lilypond-devel
[Top][All Lists]
Advanced

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

Re: Guidelines for bounding boxes?


From: Joe Neeman
Subject: Re: Guidelines for bounding boxes?
Date: Wed, 12 Aug 2009 14:03:51 +1000

On Tue, 2009-08-11 at 20:03 -0700, Patrick McCarty wrote:
> On Mon, Aug 10, 2009 at 07:02:39AM +0200, Werner LEMBERG wrote:
> > Another improvement would be to provide `shaped metrics': Currently,
> > the metrics for a glyph consist of a single rectangle.  This could be
> > extended to a list of rectangles which are then merged.  For the longa
> > glyph, this could be these two boxes:
> > 
> > 
> >      +-----+          ++         ++----+
> >      |     |          ||         ||    |
> >      +-----+     +    ||    =    ++----+
> >                       ||         ||
> >                       ||         ||
> >                       ||         ||
> >                       ||         ||
> >                       ||         ||
> >                       ++         ++
> > 
> > 
> > Doing so would allow much enhanced precision in collision handling.
> 
> This is quite interesting.
> 
> But would this help with collision handling?  I was under the
> impression that the Stencil extents (which form a box) are used for
> collision handling (skylines, etc.).
> 
> Or is the glyph metrics information used instead of the Stencil
> extents?

The glyph metrics are used to compute the stencil extents. There is no
particular reason, though, that we have to use a single box. Have a look
at calc_skyline_spacing in axis-group-interface.cc. It uses boxes for
most grobs, but more complicated outlines for others (ie. axis-groups).
It could certainly be modified to use more complicated outlines for
grobs that supported it.

FWIW, I used to think that this would be a very important feature; now
I'm not so sure. There are certainly a few cases (eg. slurs, hairpins,
treble clefs) where having more accurate outlines would help. But the
list is fairly short: for most glyphs, a more accurate box wouldn't
matter much.

Joe






reply via email to

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