gdi32: Enumerated font size should not be too large.

This reverts commit f4625d1ae1.
This commit is contained in:
Dmitry Timoshkov 2012-04-24 17:03:12 +09:00 committed by Alexandre Julliard
parent e43fce0da9
commit 57fbf1434c
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -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 */