[ros-diffs] [tkreuzer] 26743: handle FW_DONTCARE in GetFontScore. Fixes gray/thin display of dialogbox elements' text.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sun May 13 04:31:01 CEST 2007


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/objects/text.c?rev=26743&r1=26742&r2=26743&view=diff
==============================================================================
--- 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);
 




More information about the Ros-diffs mailing list