Re: PangoLayoutLine and language bindings



I nOn Fri, 2003-05-16 at 10:30, Gustavo J. A. M. Carneiro wrote:
> A Sex, 2003-05-16 ās 15:06, Owen Taylor escreveu:
> > On Fri, 2003-05-16 at 09:30, Gustavo J. A. M. Carneiro wrote:
> > > A Qui, 2003-05-15 ās 18:17, Gustavo J. A. M. Carneiro escreveu:
> > > >   I was thinking I will need to access individual PangoLayoutLine's
> > > > inside a PangoLayout from pygtk.  However, this is not implemented in
> > > > pygtk.  Since PangoLayoutLine is not GType-registered, I can understand
> > > > why.
> > > > 
> > > >   So, I propose:
> > > > 	1. Add reference counting to PangoLayoutLine;  However, as I was
> > > > writing this, I realized this is already implemented :-)
> > > > 	2. Register it as boxed type, G_TYPE_PANGO_LAYOUT_LINE, with the copy
> > > > function being pango_layout_line_ref() and the free function being
> > > > pango_layout_line_unref().
> > > > 
> > > >   So, can I send a gtk+ patch for this?
> > > 
> > >   Any problem committing this patch, then?
> > 
> > It's never OK to commit a patch simply because you didn't get a
> > response. Certainly not in one day.
> 
>   I never said I would commit without permission.  I'd never do that,
> don't worry.  I'm just trying to speed up response, and it seems to have
> worked ;)

I had figured that out. Since this seems to be a common trend, people
are henceforth warned that trolling me will get your mails *ignored*.
(Bugging me, that's fine, though it's really best to do that in private
mail rather than annoying the whole list.)

> > I'm a little hestitant about doing anything to make PangoLayoutLine 
> > more language binding friendly because that whole portion of Pango 
> > is ugly and difficult to use and difficult to language bind. I'm
> > not sure that you can do anything interesting with a PangoLayoutLine
> > without accessing line->runs, which gets you completely out of
> > language binding territory. (At least without a lot of custom
> > written API for the language binding.)
> > 
> > Why do you think you need to access PangoLayoutLine from Pango?
> 
>   The problem is that PangoLayout does not give you information about
> ascender and descender.  Such metrics are only available in
> PangoLayoutLine's.  I need a tighter bounding box of a PangoLayout than
> what is returned by pango_layout_get_pixel_extents, one that doesn't
> include empty space for accents and descender.  This is for a MathML
> renderer, where the extra space makes a lot of difference.  I would like
> to use pango_layout_line_get_pixel_extents, in the hope to get more
> detailed metrics.  That's all.

No, the metrics you get from the layout line will be no different
than metrics you get from the layout. Please read about the ink rect
in the docs.

Regards,
                                                   Owen





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