From 365dff816fe1ce97c01a6b22d451941837961383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 30 Dec 2004 15:15:01 +0000 Subject: [PATCH] tmHeight calculation svn path=/trunk/; revision=12404 --- reactos/subsys/win32k/objects/text.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index 31804dfdf99..5d15beb4e5b 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.123 2004/12/27 20:06:55 gvg Exp $ */ +/* $Id: text.c,v 1.124 2004/12/30 15:15:01 gvg Exp $ */ #include #include @@ -714,8 +714,13 @@ FillTM(TEXTMETRICW *TM, FT_Face Face, TT_OS2 *pOS2, TT_HoriHeader *pHori) Descent = pOS2->usWinDescent; } +#if 0 /* This (Wine) code doesn't seem to work correctly for us */ TM->tmAscent = (FT_MulFix(Ascent, YScale) + 32) >> 6; TM->tmDescent = (FT_MulFix(Descent, YScale) + 32) >> 6; +#else + TM->tmAscent = (Face->size->metrics.ascender + 32) >> 6; /* units above baseline */ + TM->tmDescent = (32 - Face->size->metrics.descender) >> 6; /* units below baseline */ +#endif TM->tmInternalLeading = (FT_MulFix(Ascent + Descent - Face->units_per_EM, YScale) + 32) >> 6;