On 2010-03-22, Han-Wen Nienhuys wrote:
> On Mon, Mar 22, 2010 at 11:02 PM, Patrick McCarty
> <[email protected]> wrote:
> >
> > Previous to your changes, IIRC, text_stencil() was never called.
> 
> Are you sure?
> 
> SCM
> Text_interface::interpret_string (SCM layout_smob,
>                                   SCM props,
>                                   SCM markup)
> 
> -which powers all markup text- is basically a call to
> Font_metric::text_stencil().

True.  I see why this is so confusing.  I'll try my best to explain.

*

Before the API changes, Text_interface::interpret_string() called
Font_metric::word_stencil(), which then called
Font_metric::text_stencil().

The confusing thing is that Pango_font::text_stencil() was overloaded,
in order to filter text with a tight or non-tight bbox.

Only *one* of these functions was called:

  Stencil
  Pango_font::text_stencil (string str,
                            bool music_string,
                            bool tight) const


The other one, with two parameters, was never called:

  Stencil
  Pango_font::text_stencil (string str, bool music_string) const


The only possible way to enter "non-tight bbox" mode was to call this
second function.  Since it was never called, the "tight bbox" was
always used for both fetaText markup and normal text markup.

*

Does this all make sense?

In what situations would a "non-tight" bbox be useful, since we don't
appear to be using it right now?


Thanks,
Patrick


_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to