Huw Davies : gdi32: Set otmMacLineGap from the line gap in the hhea table.

Alexandre Julliard julliard at winehq.org
Tue Dec 19 15:27:09 CST 2017


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Dec 19 10:10:33 2017 +0000

gdi32: Set otmMacLineGap from the line gap in the hhea table.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/freetype.c   | 2 +-
 dlls/gdi32/tests/font.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 660900a..4db1c7e 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -7930,7 +7930,7 @@ static BOOL get_outline_text_metrics(GdiFont *font)
     font->potm->otmrcFontBox.bottom = SCALE_Y(ft_face->bbox.yMin);
     font->potm->otmMacAscent = TM.tmAscent;
     font->potm->otmMacDescent = -TM.tmDescent;
-    font->potm->otmMacLineGap = font->potm->otmLineGap;
+    font->potm->otmMacLineGap = SCALE_Y(pHori->Line_Gap);
     font->potm->otmusMinimumPPEM = 0; /* TT Header */
     font->potm->otmptSubscriptSize.x = SCALE_X(pOS2->ySubscriptXSize);
     font->potm->otmptSubscriptSize.y = SCALE_Y(pOS2->ySubscriptYSize);
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index bd04a8b..117a14f 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1790,17 +1790,17 @@ static void test_GetKerningPairs(void)
            kd[i].otmMacDescent, otm.otmMacDescent);
         ok(near_match(kd[i].otmMacAscent, otm.otmMacAscent), "expected %d, got %d\n",
            kd[i].otmMacAscent, otm.otmMacAscent);
-todo_wine {
+todo_wine
         ok(kd[i].otmsCapEmHeight == otm.otmsCapEmHeight, "expected %u, got %u\n",
            kd[i].otmsCapEmHeight, otm.otmsCapEmHeight);
+todo_wine
         ok(kd[i].otmsXHeight == otm.otmsXHeight, "expected %u, got %u\n",
            kd[i].otmsXHeight, otm.otmsXHeight);
-        /* FIXME: this one sometimes succeeds due to expected 0, enable it when removing todo */
-        if (0) ok(kd[i].otmMacLineGap == otm.otmMacLineGap, "expected %u, got %u\n",
+        ok(kd[i].otmMacLineGap == otm.otmMacLineGap, "expected %u, got %u\n",
            kd[i].otmMacLineGap, otm.otmMacLineGap);
+todo_wine
         ok(kd[i].otmusMinimumPPEM == otm.otmusMinimumPPEM, "expected %u, got %u\n",
            kd[i].otmusMinimumPPEM, otm.otmusMinimumPPEM);
-}
 
         total_kern_pairs = GetKerningPairsW(hdc, 0, NULL);
         trace("total_kern_pairs %u\n", total_kern_pairs);




More information about the wine-cvs mailing list