Alexandre Julliard : gdi32: Take into account the FontSmoothing key for anti-aliasing.

Alexandre Julliard julliard at winehq.org
Tue Nov 6 14:27:28 CST 2012


Module: wine
Branch: master
Commit: 86c41dc4682a7dc74ae7d5222039b55dc4102f96
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=86c41dc4682a7dc74ae7d5222039b55dc4102f96

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Nov  6 15:56:30 2012 +0100

gdi32: Take into account the FontSmoothing key for anti-aliasing.

---

 dlls/gdi32/font.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 10a942b..027c392 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -295,22 +295,17 @@ static UINT get_subpixel_orientation( HKEY key )
 
 static UINT get_default_smoothing( HKEY key )
 {
+    static const WCHAR smoothing[] = {'F','o','n','t','S','m','o','o','t','h','i','n','g',0};
     static const WCHAR smoothing_type[] = {'F','o','n','t','S','m','o','o','t','h','i','n','g','T','y','p','e',0};
-    DWORD type;
-
-    /* FIXME: Ignoring FontSmoothing for now since this is
-       set to off by default in wine.inf */
+    DWORD enabled, type;
 
-    if (get_key_value( key, smoothing_type, &type )) return 0;
+    if (get_key_value( key, smoothing, &enabled )) return 0;
+    if (!enabled) return GGO_BITMAP;
 
-    switch (type)
-    {
-    case 1: /* FE_FONTSMOOTHINGSTANDARD */
-        return GGO_GRAY4_BITMAP;
-    case 2: /* FE_FONTSMOOTHINGCLEARTYPE */
+    if (!get_key_value( key, smoothing_type, &type ) && type == 2 /* FE_FONTSMOOTHINGCLEARTYPE */)
         return get_subpixel_orientation( key );
-    }
-    return 0;
+
+    return GGO_GRAY4_BITMAP;
 }
 
 




More information about the wine-cvs mailing list