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
This commit is contained in:
Vadim Zeitlin
2014-09-11 11:37:10 +00:00
parent 56d51c311a
commit b59176869a

View File

@@ -2089,8 +2089,8 @@ wxD2DFontData::wxD2DFontData(wxGraphicsRenderer* renderer, ID2D1Factory* d2dFact
wxCOMPtr<IDWriteGdiInterop> 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')