GNOME Bugzilla – Bug 154574
Setting both Pango foreground and background color fails
Last modified: 2004-12-22 21:47:04 UTC
When a PangoLayoutRun has both foreground and background colour properties set, gnome_print_pango_layout_line() is left in an unstable state following the rect_filled for the background colour for the run. One solution is to follow the rect_filled() with a gnome_print_moveto() to re-establish the current point. --- gnome-print-pango.c~ 2004-07-31 01:50:31.000000000 +0100 +++ gnome-print-pango.c 2004-10-05 10:36:05.000000000 +0100 @@ -601,6 +601,8 @@ logical_rect.x, - overall_rect.y - overall_rect.height, logical_rect.width, overall_rect.height); + gnome_print_moveto (gpc, 0, 0); + if (!properties.fg_color) gnome_print_grestore (gpc); }
Created attachment 32247 [details] [review] gnome_print_pango_layout_line() patch.
Owen?
Patch looks fine, but I think it would be cleaner to just remove the conditionalization of the gsave/grestore pair. Feel free to commit either change.
Fixed in cvs.