[FONT][WIN32SS] Ignore identical mapping in IntLoadFontSubstList
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Fri, 17 Aug 2018 01:46:01 +0000 (10:46 +0900)
committerMark Jansen <mark.jansen@reactos.org>
Fri, 17 Aug 2018 14:05:04 +0000 (16:05 +0200)
win32ss/gdi/ntgdi/freetype.c

index 118b744..5293c7e 100644 (file)
@@ -453,6 +453,15 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
             CharSets[FONTSUBST_TO] = (BYTE)_wtoi(pch + 1);
         }
 
             CharSets[FONTSUBST_TO] = (BYTE)_wtoi(pch + 1);
         }
 
+        /* is it identical? */
+        if (RtlEqualUnicodeString(&FromW, &ToW, TRUE) &&
+            CharSets[FONTSUBST_FROM] == CharSets[FONTSUBST_TO])
+        {
+            RtlFreeUnicodeString(&FromW);
+            RtlFreeUnicodeString(&ToW);
+            continue;
+        }
+
         /* allocate an entry */
         pEntry = ExAllocatePoolWithTag(PagedPool, sizeof(FONTSUBST_ENTRY), TAG_FONT);
         if (pEntry == NULL)
         /* allocate an entry */
         pEntry = ExAllocatePoolWithTag(PagedPool, sizeof(FONTSUBST_ENTRY), TAG_FONT);
         if (pEntry == NULL)