mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
temporary workaround for a font issue in win32k...negative font heights aren't handled properly.
svn path=/trunk/; revision=8431
This commit is contained in:
parent
9ece8f9451
commit
44c383eeef
1 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: desktop.c,v 1.29 2004/02/16 07:25:01 rcampbell Exp $
|
/* $Id: desktop.c,v 1.30 2004/02/28 03:02:08 rcampbell Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
#include <rosrtl/devmode.h>
|
#include <rosrtl/devmode.h>
|
||||||
#include <rosrtl/logfont.h>
|
#include <rosrtl/logfont.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
|
@ -99,6 +99,12 @@ BOOL IntGetFontMetricSetting(LPCWSTR lpKey, PLOGFONTW font)
|
||||||
{
|
{
|
||||||
if ( RegQueryValueExW(hKey, lpKey, NULL, &dwType, (LPBYTE)font, &dwSize) == ERROR_SUCCESS )
|
if ( RegQueryValueExW(hKey, lpKey, NULL, &dwType, (LPBYTE)font, &dwSize) == ERROR_SUCCESS )
|
||||||
bRet = TRUE;
|
bRet = TRUE;
|
||||||
|
|
||||||
|
if (font->lfHeight < 0)
|
||||||
|
{
|
||||||
|
DbgPrint("WARNING! WARNING! WARNING! Ugly hack alert: ROS doesn't handle pixel sizes for fonts correctly. As a result we must convert to point sizes.\n");
|
||||||
|
font->lfHeight = abs(font->lfHeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
@ -127,7 +133,7 @@ SystemParametersInfoW(UINT uiAction,
|
||||||
IntGetFontMetricSetting(L"SmCaptionFont", &pMetrics.lfSmCaptionFont);
|
IntGetFontMetricSetting(L"SmCaptionFont", &pMetrics.lfSmCaptionFont);
|
||||||
IntGetFontMetricSetting(L"MenuFont", &pMetrics.lfMenuFont);
|
IntGetFontMetricSetting(L"MenuFont", &pMetrics.lfMenuFont);
|
||||||
IntGetFontMetricSetting(L"StatusFont", &pMetrics.lfStatusFont);
|
IntGetFontMetricSetting(L"StatusFont", &pMetrics.lfStatusFont);
|
||||||
IntGetFontMetricSetting(L"MessageFont", &pMetrics.lfStatusFont);
|
IntGetFontMetricSetting(L"MessageFont", &pMetrics.lfMessageFont);
|
||||||
IntGetFontMetricSetting(L"IconFont", &IconFont);
|
IntGetFontMetricSetting(L"IconFont", &IconFont);
|
||||||
|
|
||||||
pMetrics.iBorderWidth = 1;
|
pMetrics.iBorderWidth = 1;
|
||||||
|
@ -160,6 +166,7 @@ SystemParametersInfoW(UINT uiAction,
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
DbgPrint("FontName: %S, Size: %i\n",pMetrics.lfMessageFont.lfFaceName, pMetrics.lfMessageFont.lfHeight);
|
||||||
memcpy(pvParam, (PVOID)&pMetrics, sizeof(NONCLIENTMETRICSW));
|
memcpy(pvParam, (PVOID)&pMetrics, sizeof(NONCLIENTMETRICSW));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue