summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 8d175760..09750199 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -456,15 +456,15 @@ pango_win32_font_get_glyph_extents (PangoFont *font,
if (!info)
{
+ HDC hdc = pango_win32_get_dc ();
+
info = g_new0 (PangoWin32GlyphInfo, 1);
memset (&gm, 0, sizeof (gm));
hfont = _pango_win32_font_get_hfont (font);
- SelectObject (_pango_win32_hdc, hfont);
- /* FIXME: (Alex) This constant reuse of _pango_win32_hdc is
- not thread-safe */
- res = GetGlyphOutlineA (_pango_win32_hdc,
+ SelectObject (hdc, hfont);
+ res = GetGlyphOutlineA (hdc,
glyph_index,
GGO_METRICS | GGO_GLYPH_INDEX,
&gm,