GNOME Bugzilla – Bug 340141
Update to Pango 1.16 API
Last modified: 2007-01-10 20:25:00 UTC
This is a tracker for things that have been improved in Pango and Gtk+ can use when switch to require Pango 1.14. 1) when bug 340066 is closed, there's no need to call pango_layout_context_changed() explicitly. We may note that in documentation for gtk_widget_create_pango_layout() and similar functions. The context returned by gtk_widget_get_pango_context() may as be made to stay valid even after screen changes. 2) audit gdk/gdkpango.c and gtk/ for PANGO_SCALE and PANGO_PIXELS occurences and adjust them to use PANGO_PIXELS_FLOOR/CEIL if that makes more sense, etc. off-by-one fixes. bug 329547.
When Bug 343355 – Add pango_cairo_show_error_underline & pango_cairo_error_underline_path, is resolved, we can remove the duplicate code in gdkpango.c.
Created attachment 66861 [details] [review] patch to use new api Patch to use new API from Bug 343355 – Add pango_cairo_show_error_underline & pango_cairo_error_underline_path. Removes code in gdkpango that was duplicated from pangocairo. Tested, working.
When bug Bug 333982 is resolved, gtk_get_default_language can simply wrap the Pango API.
Use pango_layout_iter_get_line_readonly() instead of pango_layout_iter_get_line().
bug 333982. Use pango_language_get_default() in gtk_get_default_language().
Bug 373856. Add gdk_color_to_string() as a wrapper of pango_color_to_string().
2006-12-22 Matthias Clasen <mclasen@redhat.com> * gdk/gdkpango.c: Use pango_cairo_show_error_underline. (#340141, Behdad Esfahbod)
Created attachment 78848 [details] [review] use readonly PangoLayoutLine accessors
Created attachment 78849 [details] [review] use pango_language_get_default()
Please go ahead and commit these, thanks.
2006-12-24 Behdad Esfahbod <behdad@gnome.org> Bug 340141 – Update to Pango 1.16 API * gdk/gdkpango.c (layout_iter_get_line_clip_region), (gdk_pango_layout_line_get_clip_region): * gtk/gtkcalendar.c (gtk_calendar_size_request): * gtk/gtkentry.c (gtk_entry_get_pixel_ranges), (get_layout_position), (gtk_entry_find_position), (gtk_entry_adjust_scroll): * gtk/gtkiconview.c (get_pango_text_offsets): * gtk/gtklabel.c (get_cursor_direction): * gtk/gtkstyle.c (get_insensitive_layout): * gtk/gtktextdisplay.c (render_para): * gtk/gtktextlayout.c (allocate_child_widgets), (find_display_line_below), (find_display_line_above), (gtk_text_layout_move_iter_to_previous_line), (gtk_text_layout_move_iter_to_next_line), (gtk_text_layout_move_iter_to_line_end), (gtk_text_layout_iter_starts_line), (gtk_text_layout_move_iter_to_x): * gtk/gtktextutil.c (limit_layout_lines): Use the _readonly version of pango_layout_iter_get_line(), pango_layout_iter_get_run(), pango_layout_get_line(), and pango_layout_get_lines(). * gtk/gtkmain.c (gtk_get_default_language): Use pango_get_default_language().
Attachment 79428 [details] Patch to use pango_matrix_transform_rectangle which will be in pango 1.15.3
2007-01-10 Behdad Esfahbod <behdad@gnome.org> * gdk/gdkpango.c (gdk_draw_layout_with_colors): * gtk/gtklabel.c (gtk_label_size_request): Use pango_matrix_transform_rectangle(). (#340141) * configure.in: Bump pango requirement to 1.15.3. Pango 1.16 API is almost frozen now. Closing. The two items listed in the opening report of this bug still remain relevant. That is, when bug 340066 is closed, Gtk+ needs to be updated (docs at least), and that one should audit gtk/ for PANGO_SCALE and PANGO_PIXELS uses, but gdk/ is fine now.