[PATCH v3 3/7] gdi32: Handle Wine specific vertical orientations in init_font_options().

Paul Gofman pgofman at codeweavers.com
Thu Dec 3 04:54:30 CST 2020


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/gdi32/font.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 9c24182c57e..c952495f7da 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3936,7 +3936,7 @@ static DWORD get_key_value( HKEY key1, HKEY key2, const WCHAR *name, DWORD *valu
 static void init_font_options(void)
 {
     HKEY key, volatile_key = NULL;
-    DWORD i, type, size, val, gamma = 1400;
+    DWORD i, type, size, val, gamma = 1400, vertical = 0;
     WCHAR buffer[20];
 
     size = sizeof(buffer);
@@ -3950,16 +3950,18 @@ static void init_font_options(void)
     {
         RegOpenKeyW( HKEY_CURRENT_USER, L"Software\\Wine\\Temporary System Parameters\\Control Panel\\Desktop",
                 &volatile_key );
-        /* FIXME: handle vertical orientations even though Windows doesn't */
+
+        get_key_value( volatile_key, key, L"WineFontSmoothingVertical", &vertical );
+
         if (!get_key_value( volatile_key, key, L"FontSmoothingOrientation", &val ))
         {
             switch (val)
             {
             case 0: /* FE_FONTSMOOTHINGORIENTATIONBGR */
-                subpixel_orientation = WINE_GGO_HBGR_BITMAP;
+                subpixel_orientation = vertical ? WINE_GGO_VBGR_BITMAP : WINE_GGO_HBGR_BITMAP;
                 break;
             case 1: /* FE_FONTSMOOTHINGORIENTATIONRGB */
-                subpixel_orientation = WINE_GGO_HRGB_BITMAP;
+                subpixel_orientation = vertical ? WINE_GGO_VRGB_BITMAP : WINE_GGO_HRGB_BITMAP;
                 break;
             }
         }
-- 
2.28.0




More information about the wine-devel mailing list