gdi32: Fix the regression caused by the scaling font metrics patch. Take 2

Dmitry Timoshkov dmitry at codeweavers.com
Wed Jan 9 07:58:00 CST 2008


Hello,

this version of the patch passes 'make test' in riched20.

Changelog:
    gdi32: Fix the regression caused by the scaling font metrics patch.
---
 dlls/gdi32/freetype.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 480b8e5..2de49d4 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -3125,13 +3125,15 @@ found:
     TRACE("Chosen: %s %s (%s/%p:%ld)\n", debugstr_w(family->FamilyName),
 	  debugstr_w(face->StyleName), face->file, face->font_data_ptr, face->face_index);
 
-    ret->ppem = height;
-    ret->aveWidth = abs(lf.lfWidth);
-
     ret->scale_x = 0.0;
     ret->scale_y = 0.0;
 
+    ret->aveWidth = abs(lf.lfWidth);
+
     if(!face->scalable) {
+        ret->ppem = face->size.height;
+        if (height != 0) ret->ppem += diff;
+
         width = face->size.x_ppem >> 6;
         height = face->size.y_ppem >> 6;
     }
-- 
1.5.3.8






More information about the wine-patches mailing list