From 72e16506d6bd43efe4db24ebc3f69537f7208b1a Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Mon, 11 Jul 2016 13:22:05 +0200 Subject: Win32: Reset BkMode so ETO doesn't draw its own If the DC's background mode is set to OPAQUE, ExtTextOut will draw its own background boxes around glyph items. Since we don't place any requirements on the DC, set the background mode to TRANSPARENT before rendering any glyphs (and reset it to its original value afterwards). https://bugzilla.gnome.org/show_bug.cgi?id=768679 --- pango/pangowin32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pango/pangowin32.c b/pango/pangowin32.c index d39cf8b5..04e0d51e 100644 --- a/pango/pangowin32.c +++ b/pango/pangowin32.c @@ -1020,6 +1020,7 @@ pango_win32_render_layout_line (HDC hdc, PangoRectangle overall_rect; PangoRectangle logical_rect; PangoRectangle ink_rect; + int oldbkmode = SetBkMode (hdc, TRANSPARENT); int x_off = 0; @@ -1145,6 +1146,8 @@ pango_win32_render_layout_line (HDC hdc, x_off += logical_rect.width; } + + SetBkMode (hdc, oldbkmode); } /** -- cgit v1.2.1