Shawn M. Chapla : gdiplus: Set font emSize to height minus internal leading.

Alexandre Julliard julliard at winehq.org
Wed Jul 15 16:44:46 CDT 2020


Module: wine
Branch: master
Commit: 04d536267e35cc7f3d30667971e1c6dbd5a298f1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=04d536267e35cc7f3d30667971e1c6dbd5a298f1

Author: Shawn M. Chapla <schapla at codeweavers.com>
Date:   Tue Jul 14 21:24:57 2020 -0400

gdiplus: Set font emSize to height minus internal leading.

Signed-off-by: Shawn M. Chapla <schapla at codeweavers.com>
Signed-off-by: Esme Povirk <esme at codewevers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/font.c       | 2 +-
 dlls/gdiplus/tests/font.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index a7719a9458..eb0b6c0836 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -219,7 +219,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
     if (!*font) return OutOfMemory;
 
     (*font)->unit = UnitWorld;
-    (*font)->emSize = otm.otmTextMetrics.tmAscent;
+    (*font)->emSize = otm.otmTextMetrics.tmHeight - otm.otmTextMetrics.tmInternalLeading;
     (*font)->otm = otm;
 
     stat = GdipCreateFontFamilyFromName(facename, NULL, &(*font)->family);
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 74cf451e36..b762f7c45f 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -344,7 +344,7 @@ static void test_logfont(void)
 
             stat = GdipGetFontSize(font, &rval);
             expect(Ok, stat);
-            todo_wine expectf(test_sizes[i].expected, rval);
+            expectf(test_sizes[i].expected, rval);
 
             GdipDeleteFont(font);
             font = NULL;




More information about the wine-cvs mailing list