From c7a6c1af0d1f2ac722f1c0d4f2e518d301d05646 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 14 Jan 2008 19:39:33 +0800 Subject: [PATCH] gdi32: Initialize more fields in GetEnumStructs. --- dlls/gdi32/freetype.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index af5ed9a059b..562c32994ca 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -3290,8 +3290,6 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, font->name = strdupW(face->family->FamilyName); font->ntmFlags = face->ntmFlags; - memset(&pelf->elfLogFont, 0, sizeof(LOGFONTW)); - if (WineEngGetOutlineTextMetrics(font, 0, NULL)) { memcpy(&pntm->ntmTm, &font->potm->otmTextMetrics, sizeof(TEXTMETRICW)); @@ -3315,17 +3313,19 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, pntm->ntmTm.ntmSizeEM = pntm->ntmTm.tmHeight - pntm->ntmTm.tmInternalLeading; lstrcpynW(pelf->elfLogFont.lfFaceName, face->family->FamilyName, LF_FACESIZE); - lstrcpynW(pelf->elfFullName, face->family->FamilyName, LF_FACESIZE); - pelf->elfStyle[0] = '\0'; + lstrcpynW(pelf->elfFullName, face->family->FamilyName, LF_FULLFACESIZE); + lstrcpynW(pelf->elfStyle, face->StyleName, LF_FACESIZE); } pntm->ntmTm.ntmFlags = face->ntmFlags; pntm->ntmTm.ntmCellHeight = pntm->ntmTm.tmHeight; pntm->ntmTm.ntmAvgWidth = pntm->ntmTm.tmAveCharWidth; - memset(&pntm->ntmFontSig, 0, sizeof(FONTSIGNATURE)); + memcpy(&pntm->ntmFontSig, &face->fs, sizeof(FONTSIGNATURE)); pelf->elfScript[0] = '\0'; /* This will get set in WineEngEnumFonts */ + pelf->elfLogFont.lfEscapement = 0; + pelf->elfLogFont.lfOrientation = 0; pelf->elfLogFont.lfHeight = pntm->ntmTm.tmHeight; pelf->elfLogFont.lfWidth = pntm->ntmTm.tmAveCharWidth; pelf->elfLogFont.lfWeight = pntm->ntmTm.tmWeight;