https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ae8417fd9068dd32ec180636117bba1dc0603325

commit ae8417fd9068dd32ec180636117bba1dc0603325
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Fri Apr 26 21:56:36 2019 +0900
Commit:     GitHub <[email protected]>
CommitDate: Fri Apr 26 21:56:36 2019 +0900

    [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 a613a9f265..ae6feb006a 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;

Reply via email to