GNOME Bugzilla – Bug 654343
pango_layout_iter_get_char_extents misses out annotation for logical_rect
Last modified: 2012-08-19 11:30:03 UTC
get_char_extents() is currently not usable via gobject introspection, because the parameter logical rect isn't declared as output parameter. Minimal example: python -c 'from gi.repository import Gdk,Pango; l = Pango.Layout(context=Gdk.pango_context_get()); print l.get_iter().get_char_extents(None)' Traceback (most recent call last):
+ Trace 227721
return info.invoke(*args)
Please, could someone have a quick look at this? I'm still unable to call get_char_extents from python. It expects a Pango.Rectangle as a parameter, but I believe it shouldn't and instead return a rectangle. Maybe I'm missing something and there is a new way to get the extents of characters in a layout now. If that is the case, please someone drop me a hint, I'm unable to find it. Thanks in advance, I really appreciate it. This is with gir1.2-pango-1.0, 1.29.3+git20110916-0ubuntu1 on Ubuntu Oneiric.
I'm clueless. CC'ing a couple of people. If someone knows what's wrong, please go ahead and fix.
Many introspection fixes went in recently. Closing. Please reopen if problem persists.
What version will have the fix? Will it be in pango 1.31? I've tested 1.30.1-0ubuntu3 and there get_char_extents() isn't callable yet.
Any version after 1.30.1 but there is no tarball yet. Most important fix was http://git.gnome.org/browse/pango/commit/?id=feff5a6e2682048a07a6ba09af83254e290bf394
Awesome, thanks for the link. Pango attributes seem fixed too, that's just great.