[WIN32SS][FONT] Improve FamilyUnknown Penalty (#1097)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Thu, 6 Dec 2018 00:32:02 +0000 (09:32 +0900)
committerGitHub <noreply@github.com>
Thu, 6 Dec 2018 00:32:02 +0000 (09:32 +0900)
CORE-15419

win32ss/gdi/ntgdi/freetype.c

index e07606a..d6aafb5 100644 (file)
@@ -4581,12 +4581,13 @@ GetFontPenalty(const LOGFONTW *               LogFont,
             /* Requested a family, but the candidate's family is different. */
             GOT_PENALTY("Family", 9000);
         }
-        if ((TM->tmPitchAndFamily & 0xF0) == FF_DONTCARE)
-        {
-            /* FamilyUnknown Penalty 8000 */
-            /* Requested a family, but the candidate has no family. */
-            GOT_PENALTY("FamilyUnknown", 8000);
-        }
+    }
+
+    if ((TM->tmPitchAndFamily & 0xF0) == FF_DONTCARE)
+    {
+        /* FamilyUnknown Penalty 8000 */
+        /* Requested a family, but the candidate has no family. */
+        GOT_PENALTY("FamilyUnknown", 8000);
     }
 
     /* Is the candidate a non-vector font? */