lilypond-devel
[Top][All Lists]
Advanced

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

Re: Font_metric code cleanup breaks fetaText positioning


From: Patrick McCarty
Subject: Re: Font_metric code cleanup breaks fetaText positioning
Date: Mon, 22 Mar 2010 23:40:35 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

On 2010-03-22, Han-Wen Nienhuys wrote:
> On Mon, Mar 22, 2010 at 11:02 PM, Patrick McCarty
> <address@hidden> 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




reply via email to

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