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 154574 - Setting both Pango foreground and background color fails
Setting both Pango foreground and background color fails
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-10-05 15:05 UTC by tony.graham
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
gnome_print_pango_layout_line() patch. (374 bytes, patch)
2004-10-05 15:08 UTC, tony.graham
none Details | Review

Description tony.graham 2004-10-05 15:05:29 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);
 		}
Comment 1 tony.graham 2004-10-05 15:08:11 UTC
Created attachment 32247 [details] [review]
gnome_print_pango_layout_line() patch.
Comment 2 Morten Welinder 2004-10-05 15:53:37 UTC
Owen?
Comment 3 Owen Taylor 2004-10-05 16:44:57 UTC
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.
Comment 4 Morten Welinder 2004-10-14 15:13:40 UTC
Fixed in cvs.