[WIN32SS][FONT] Fix ntmCellHeight value to usWinAscent + usWinDescent (#1010)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 4 Nov 2018 21:03:53 +0000 (06:03 +0900)
committerGitHub <noreply@github.com>
Sun, 4 Nov 2018 21:03:53 +0000 (06:03 +0900)
CORE-15331

win32ss/gdi/ntgdi/freetype.c

index 55efa4e..ee242a3 100644 (file)
@@ -2583,10 +2583,6 @@ FontFamilyFillInfo(PFONTFAMILYINFO Info, LPCWSTR FaceName,
 
     if (0 == Ntm->ntmFlags) Ntm->ntmFlags = NTM_REGULAR;
 
-    Ntm->ntmSizeEM = Otm->otmEMSquare;
-    Ntm->ntmCellHeight = Otm->otmEMSquare;
-    Ntm->ntmAvgWidth = 0;
-
     Info->FontType = (0 != (TM->tmPitchAndFamily & TMPF_TRUETYPE)
                       ? TRUETYPE_FONTTYPE : 0);
 
@@ -2629,6 +2625,10 @@ FontFamilyFillInfo(PFONTFAMILYINFO Info, LPCWSTR FaceName,
         return;
     }
 
+    Ntm->ntmSizeEM = Otm->otmEMSquare;
+    Ntm->ntmCellHeight = pOS2->usWinAscent + pOS2->usWinDescent;
+    Ntm->ntmAvgWidth = 0;
+
     fs.fsCsb[0] = pOS2->ulCodePageRange1;
     fs.fsCsb[1] = pOS2->ulCodePageRange2;
     fs.fsUsb[0] = pOS2->ulUnicodeRange1;