Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions cocos2dx/platform/win32/CCImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,25 +152,26 @@ class BitmapDC
pwszBuffer = NULL;
}
}
if (fontPath.size() > 0)
m_curFontPath = fontPath;
else
m_curFontPath.clear();
// register temp font
if (m_curFontPath.size() > 0)
}
if (fontPath.size() > 0)
m_curFontPath = fontPath;
else
m_curFontPath.clear();
// register temp font
if (m_curFontPath.size() > 0)
{
wchar_t * pwszBuffer = utf8ToUtf16(m_curFontPath);
if (pwszBuffer)
{
wchar_t * pwszBuffer = utf8ToUtf16(m_curFontPath);
if (pwszBuffer)
if(AddFontResource(pwszBuffer))
{
if(AddFontResource(pwszBuffer))
{
SendMessage( m_hWnd, WM_FONTCHANGE, 0, 0);
}
delete [] pwszBuffer;
pwszBuffer = NULL;
}
SendMessage( m_hWnd, WM_FONTCHANGE, 0, 0);
}
delete [] pwszBuffer;
pwszBuffer = NULL;
}
}
}

m_hFont = NULL;

// disable Cleartype
Expand Down