[2/3] gdi32: Enumerated font size should not be too large. Resend.

Dmitry Timoshkov dmitry at baikal.ru
Tue Apr 24 03:03:12 CDT 2012


This reverts commit f4625d1ae1109ee9a30faa8254b10779853f0ac2.
---
 dlls/gdi32/freetype.c   |    2 +-
 dlls/gdi32/tests/font.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 3875e4f..401cfd1 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -5048,7 +5048,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf,
     font = alloc_font();
 
     if(face->scalable) {
-        height = -2048; /* 2048 is the most common em size */
+        height = 100;
         width = 0;
     } else {
         height = face->size.y_ppem >> 6;
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 9bd5f1c..bda8fc8 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -2058,6 +2058,7 @@ static INT CALLBACK arial_enum_proc(const LOGFONT *lf, const TEXTMETRIC *tm, DWO
     struct enum_font_data *efd = (struct enum_font_data *)lParam;
 
     ok(lf->lfHeight == tm->tmHeight, "lfHeight %d != tmHeight %d\n", lf->lfHeight, tm->tmHeight);
+    ok(lf->lfHeight > 0 && lf->lfHeight < 200, "enumerated font height %d\n", lf->lfHeight);
 
     if (type != TRUETYPE_FONTTYPE) return 1;
     if (0) /* Disabled to limit console spam */
@@ -2076,6 +2077,7 @@ static INT CALLBACK arial_enum_procw(const LOGFONTW *lf, const TEXTMETRICW *tm,
     struct enum_font_dataW *efd = (struct enum_font_dataW *)lParam;
 
     ok(lf->lfHeight == tm->tmHeight, "lfHeight %d != tmHeight %d\n", lf->lfHeight, tm->tmHeight);
+    ok(lf->lfHeight > 0 && lf->lfHeight < 200, "enumerated font height %d\n", lf->lfHeight);
 
     if (type != TRUETYPE_FONTTYPE) return 1;
     if (0) /* Disabled to limit console spam */
-- 
1.7.9.4




More information about the wine-patches mailing list