Skip to content

Commit 5fb9d5f

Browse files
committed
[uxtheme]
- Add an awful hack to prevent creating a LOGFONTW with a positive height that makes ros nuts svn path=/branches/GSoC_2011/ThemesSupport/; revision=53295
1 parent e4d0ea5 commit 5fb9d5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dll/win32/uxtheme/msstyles.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,13 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpCur, LPCWSTR lpEnd,
12571257
*lpValEnd = lpCur;
12581258
return E_PROP_ID_UNSUPPORTED;
12591259
}
1260+
if(pointSize > 0)
1261+
{
1262+
HDC hdc = GetDC(0);
1263+
pointSize = -MulDiv(pointSize, GetDeviceCaps(hdc, LOGPIXELSY), 72);
1264+
ReleaseDC(0, hdc);
1265+
}
1266+
12601267
pFont->lfHeight = pointSize;
12611268
pFont->lfWeight = FW_REGULAR;
12621269
pFont->lfCharSet = DEFAULT_CHARSET;

0 commit comments

Comments
 (0)