After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654343 - pango_layout_iter_get_char_extents misses out annotation for logical_rect
pango_layout_iter_get_char_extents misses out annotation for logical_rect
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.29.x
Other Linux
: Normal blocker
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-10 15:13 UTC by marmuta
Modified: 2012-08-19 11:30 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2



Description marmuta 2011-07-10 15:13:41 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):
  • File "<string>", line 1 in <module>
  • File "/usr/lib/python2.7/dist-packages/gi/types.py", line 44 in function
    return info.invoke(*args)
TypeError: argument 1: Must be Pango.Rectangle, not NoneType

Comment 1 marmuta 2011-11-11 18:21:32 UTC
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.
Comment 2 Behdad Esfahbod 2011-11-11 19:51:31 UTC
I'm clueless.  CC'ing a couple of people.  If someone knows what's wrong, please go ahead and fix.
Comment 3 Behdad Esfahbod 2012-08-18 17:23:42 UTC
Many introspection fixes went in recently.  Closing.  Please reopen if problem persists.
Comment 4 marmuta 2012-08-19 09:00:53 UTC
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.
Comment 5 André Klapper 2012-08-19 11:04:41 UTC
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
Comment 6 marmuta 2012-08-19 11:30:03 UTC
Awesome, thanks for the link. Pango attributes seem fixed too, that's just great.