Dmitry Timoshkov : gdi32/tests: Test otmEMSquare only for Truetype fonts.

Alexandre Julliard julliard at winehq.org
Mon Jun 7 16:30:37 CDT 2021


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon May 31 09:42:32 2021 +0300

gdi32/tests: Test otmEMSquare only for Truetype fonts.

It looks like GetOutlineTextMetrics no longer fails for bitmat fonts
under Windows 10.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51184
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/tests/font.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index ed0acf8243a..ffb400ba838 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -353,7 +353,8 @@ if (0) /* these metrics are scaled too, but with rounding errors */
         ok(otm.otmMacDescent < 0, "otm.otmMacDescent should be < 0\n");
         ok(tm.tmDescent > 0, "tm.tmDescent should be > 0\n");
         ok(otm.otmMacDescent == -tm.tmDescent, "descent %d != %d\n", otm.otmMacDescent, -tm.tmDescent);
-        ok(otm.otmEMSquare == 2048, "expected 2048, got %d\n", otm.otmEMSquare);
+        if (otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE)
+            ok(otm.otmEMSquare == 2048, "expected 2048, got %d\n", otm.otmEMSquare);
     }
     else
     {




More information about the wine-cvs mailing list