Author: tkreuzer
Date: Sun May 13 06:31:00 2007
New Revision: 26743
URL:
http://svn.reactos.org/svn/reactos?rev=26743&view=rev
Log:
handle FW_DONTCARE in GetFontScore. Fixes gray/thin display of dialogbox elements'
text.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c Sun May 13 06:31:00 2007
@@ -3923,15 +3923,22 @@
{
Score += 25;
}
- if (LogFont->lfWeight < Otm->otmTextMetrics.tmWeight)
+ if (LogFont->lfWeight != FW_DONTCARE)
+ {
+ if (LogFont->lfWeight < Otm->otmTextMetrics.tmWeight)
{
WeightDiff = Otm->otmTextMetrics.tmWeight - LogFont->lfWeight;
}
+ else
+ {
+ WeightDiff = LogFont->lfWeight - Otm->otmTextMetrics.tmWeight;
+ }
+ Score += (1000 - WeightDiff) / (1000 / 25);
+ }
else
- {
- WeightDiff = LogFont->lfWeight - Otm->otmTextMetrics.tmWeight;
- }
- Score += (1000 - WeightDiff) / (1000 / 25);
+ {
+ Score += 25;
+ }
ExFreePool(Otm);