[WIN32SS] Use Panose info from freetype. Patch by Katayama Hirofumi MZ. CORE-13038
authorMark Jansen <mark.jansen@reactos.org>
Fri, 7 Apr 2017 22:30:20 +0000 (22:30 +0000)
committerMark Jansen <mark.jansen@reactos.org>
Fri, 7 Apr 2017 22:30:20 +0000 (22:30 +0000)
svn path=/trunk/; revision=74282

reactos/win32ss/gdi/ntgdi/freetype.c

index c404f98..f827edf 100644 (file)
@@ -1358,7 +1358,15 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI,
 
     if (!FT_IS_FIXED_WIDTH(Face))
     {
-        TM->tmPitchAndFamily = _TMPF_VARIABLE_PITCH;
+        switch (pOS2->panose[PAN_PROPORTION_INDEX])
+        {
+            case PAN_PROP_MONOSPACED:
+                TM->tmPitchAndFamily = 0;
+                break;
+            default:
+                TM->tmPitchAndFamily = _TMPF_VARIABLE_PITCH;
+                break;
+        }
     }
     else
     {