From ae8417fd9068dd32ec180636117bba1dc0603325 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 26 Apr 2019 21:56:36 +0900 Subject: [PATCH] [WIN32SS][NTGDI] Keep FontSubstitutes enumeration CORE-15785 (#1532) Fix CORE-15785. When LOGFONT.lfFaceName[0] == 0, then enumeration of font substitutes had failed. CORE-15785 --- win32ss/gdi/ntgdi/freetype.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index a613a9f2652..ae6feb006a5 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -2821,7 +2821,13 @@ GetFontFamilyInfoForSubstitutes(const LOGFONTW *LogFont, GetFontFamilyInfoForList(&lf, Info, pFromW->Buffer, pCount, MaxCount, &Win32Process->PrivateFontListHead); IntUnLockProcessPrivateFonts(Win32Process); - break; + + if (LogFont->lfFaceName[0]) + { + /* it's already matched to the exact name and charset if the name + was specified at here, then so don't scan more for another name */ + break; + } } return TRUE;