Re: PangoLayoutLine and language bindings
- From: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org, pygtk daa com au
- Subject: Re: PangoLayoutLine and language bindings
- Date: 16 May 2003 15:30:18 +0100
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'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.
Regards.
--
Gustavo João Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]