GNOME Bugzilla – Bug 549003
pango_layout_set_height(): layout should not be cleared unless required
Last modified: 2008-08-22 16:57:36 UTC
In pango_layout_set_height(), if pango_layout_is_ellipsized() is FALSE, and the new height is set to new_height where -new_height is larger than the line count (or equal to it), the lines should not be cleared. This is relevant in Nautilus where we use pango_layout_set_height(-G_MININT) layout_request = pango_layout_get_extends () pango_layout_set_height(-sane_number_of_lines) sane_layout_request = pango_layout_get_extends () usually, sane_number_of_lines will be larger than or equal to pango_layout_get_lines(), and no ellipsization takes place (although the mode is PANGO_ELLIPSIZE_END).
Makes sense.
Please test, or better, read the code and check that I didn't do anything stupid. 2008-08-22 Behdad Esfahbod <behdad@gnome.org> Bug 549003 – pango_layout_set_height(): layout should not be cleared unless required * pango/pango-layout-private.h: * pango/pango-layout.c (pango_layout_init), (pango_layout_set_height), (pango_layout_get_line_count), (pango_layout_clear_lines), (add_line): Don't invalidate layout if the new height does not force ellipsization.
The change looks resonable, thanks for the quick response!