From b59176869a3a033675142d73d36da73cf33e98c4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 11 Sep 2014 11:37:10 +0000 Subject: [PATCH] Fix Direct2D code compilation in non-Unicode build. DirectWrite GDI interop only works with Unicode LOGFONTW, so use it explicitly instead of LOGFONT which is LOGFONTA in non-Unicode build. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/graphicsd2d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 611d94cf09..2ee674f08d 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -2089,8 +2089,8 @@ wxD2DFontData::wxD2DFontData(wxGraphicsRenderer* renderer, ID2D1Factory* d2dFact wxCOMPtr gdiInterop; hr = wxDWriteFactory()->GetGdiInterop(&gdiInterop); - LOGFONT logfont; - GetObject(font.GetHFONT(), sizeof(logfont), &logfont); + LOGFONTW logfont; + GetObjectW(font.GetHFONT(), sizeof(logfont), &logfont); // Ensure the LOGFONT object contains the correct font face name if (logfont.lfFaceName[0] == '\0')