From 23cd7fb231725ac7d7ec4e24faa306e4ca77ca75 Mon Sep 17 00:00:00 2001 From: Jason Filby Date: Fri, 23 Jul 2004 20:46:20 +0000 Subject: [PATCH] Set TMPF_TRUETYPE flag for TEXTMETRICW variable in NtGdiGetTextMetrics if dealing with a TrueType font svn path=/trunk/; revision=10263 --- reactos/subsys/win32k/objects/text.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index 355b726bd17..eefb58d8b9f 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: text.c,v 1.105 2004/07/14 20:48:58 navaraf Exp $ */ +/* $Id: text.c,v 1.106 2004/07/23 20:46:20 jfilby Exp $ */ #include #include @@ -2611,7 +2611,11 @@ NtGdiGetTextMetrics(HDC hDC, SafeTm.tmAscent = (Face->size->metrics.ascender + 32) >> 6; // units above baseline SafeTm.tmDescent = (32 - Face->size->metrics.descender) >> 6; // units below baseline SafeTm.tmHeight = SafeTm.tmAscent + SafeTm.tmDescent; - SafeTm.tmMaxCharWidth = (Face->size->metrics.max_advance + 32) >> 6; + SafeTm.tmMaxCharWidth = (Face->size->metrics.max_advance + 32) >> 6; + if (FT_IS_SFNT(FontGDI->face)) + { + SafeTm.tmPitchAndFamily |= TMPF_TRUETYPE; + } Status = MmCopyToCaller(tm, &SafeTm, sizeof(TEXTMETRICW)); } }