GNOME Bugzilla – Bug 328456
Add pango_layout_get_effective_width
Last modified: 2006-01-29 01:41:36 UTC
A function to get the effective width of the layout as it will be rendered, is useful. It should be something like: int pango_layout_get_effective_width (const PangoLayout *layout) { int width; width = pango_layout_get_width (layout); if (width == -1) pango_layout_get_size (layout, &width, NULL); } This is extremely useful when positioning right-to-left layouts, in Gtk+ for example. The problem is that when doing rtl, the caller needs to know how much to offset the layout, and neither get_width, nor get_size work correctly.
Oops. It should return the width, of course.
*** This bug has been marked as a duplicate of 326693 ***