Author: jgardou Date: Fri Jun 18 21:12:29 2010 New Revision: 47800
URL: http://svn.reactos.org/svn/reactos?rev=47800&view=rev Log: [GDI32] - Use default LOGFONT in EnumFontFamilies. + ~3000 gdi32:font winetests
Modified: branches/reactos-yarotows/dll/win32/gdi32/objects/font.c
Modified: branches/reactos-yarotows/dll/win32/gdi32/objects/font.c URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/dll/win32/gdi32... ============================================================================== --- branches/reactos-yarotows/dll/win32/gdi32/objects/font.c [iso-8859-1] (original) +++ branches/reactos-yarotows/dll/win32/gdi32/objects/font.c [iso-8859-1] Fri Jun 18 21:12:29 2010 @@ -154,6 +154,7 @@ int i; ENUMLOGFONTEXA EnumLogFontExA; NEWTEXTMETRICEXA NewTextMetricExA; + LOGFONTW lfW;
Info = RtlAllocateHeap(GetProcessHeap(), 0, INITIAL_FAMILY_COUNT * sizeof(FONTFAMILYINFO)); @@ -161,6 +162,15 @@ { return 0; } + + if (!LogFont) + { + lfW.lfCharSet = DEFAULT_CHARSET; + lfW.lfPitchAndFamily = 0; + lfW.lfFaceName[0] = 0; + LogFont = &lfW; + } + FontFamilyCount = NtGdiGetFontFamilyInfo(Dc, LogFont, Info, INITIAL_FAMILY_COUNT); if (FontFamilyCount < 0) { @@ -464,7 +474,7 @@ return 0; }
- nSet = uCount; + nSet = uCount; if ( nSet > lpResults->nGlyphs ) nSet = lpResults->nGlyphs;
@@ -522,7 +532,7 @@ iFirstChar, (ULONG)(iLastChar - iFirstChar + 1), (PWCHAR) NULL, - 0, + 0, (PVOID) pxBuffer); }
@@ -688,7 +698,7 @@ wstr[0], (ULONG) count, (PWCHAR) wstr, - GCW_NOFLOAT|GCW_WIN32, + GCW_NOFLOAT|GCW_WIN32, (PVOID) lpBuffer);
HeapFree(GetProcessHeap(), 0, str); @@ -772,7 +782,7 @@ return FALSE; }
- ret = NtGdiGetCharABCWidthsW( hdc, + ret = NtGdiGetCharABCWidthsW( hdc, wstr[0], (ULONG)count, (PWCHAR)wstr, @@ -890,7 +900,7 @@ if ((Ret == ARABIC_CHARSET) || (Ret == HEBREW_CHARSET)) Ret = (GCP_KASHIDA|GCP_DIACRITIC|GCP_LIGATE|GCP_GLYPHSHAPE|GCP_REORDER); } - Gcp = GetDCDWord(hDc, GdiGetFontLanguageInfo, GCP_ERROR); + Gcp = GetDCDWord(hDc, GdiGetFontLanguageInfo, GCP_ERROR); if ( Gcp == GCP_ERROR) return Gcp; else