From e8d8b6568d1cedf7e889e2cfee42c20ad2cff88c Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 21 Mar 2012 10:59:16 +0000 Subject: [PATCH] [FTFD] Fix a typo, add a trace, add a comment svn path=/branches/GSoC_2011/GdiFontDriver/; revision=56203 --- drivers/video/font/ftfd/glyph.c | 10 +++++++--- drivers/video/font/ftfd/tttables.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/video/font/ftfd/glyph.c b/drivers/video/font/ftfd/glyph.c index 3e8945678c3..ff07a79ab4b 100644 --- a/drivers/video/font/ftfd/glyph.c +++ b/drivers/video/font/ftfd/glyph.c @@ -188,6 +188,7 @@ FtfdCreateFontInstance( /* Check if there is rotation / skewing (cannot use iComplexity!?) */ if (!FLOATOBJ_bIsNull(&fxform.eM12) || !FLOATOBJ_bIsNull(&fxform.eM21)) { + TRACE("Setting extended xform\n"); //__debugbreak(); /* Create a transformation matrix that is applied after the character @@ -386,8 +387,6 @@ FtfdQueryMaxExtents( } /* Copy some values from the font structure */ - pfddm->fxMaxAscender = (pfont->metrics.fxMaxAscender + 15) & ~0x0f; - pfddm->fxMaxDescender = (pfont->metrics.fxMaxDescender + 15) & ~0x0f; pfddm->ptlUnderline1 = pfont->metrics.ptlUnderline1; pfddm->ptlStrikeout = pfont->metrics.ptlStrikeout; pfddm->ptlULThickness = pfont->metrics.ptlULThickness; @@ -395,6 +394,11 @@ FtfdQueryMaxExtents( pfddm->cxMax = pfont->sizlMax.cx; pfddm->cyMax = pfont->sizlMax.cy; + /* These values are rounded to pixels to fix inconsistent height + of marked text and the rest of the marked row in XP list boxes */ + pfddm->fxMaxAscender = (pfont->metrics.fxMaxAscender + 15) & ~0x0f; + pfddm->fxMaxDescender = (pfont->metrics.fxMaxDescender + 15) & ~0x0f; + /* Convert the base vectors from FLOATOBJ to FLOATL */ pfddm->pteBase.x = FLOATOBJ_GetFloat(&pfont->ptefBase.x); pfddm->pteBase.y = FLOATOBJ_GetFloat(&pfont->ptefBase.y); @@ -460,7 +464,7 @@ FtfdQueryGlyphData( /* D is the glyph advance width. Convert it from 26.6 to 28.4 fixpoint format */ pgd->fxD = ftglyph->advance.x >> 2; // FIXME: should be projected on the x-axis - /* Get the bitnmap size */ + /* Get the bitmap size */ sizlBitmap.cx = ftglyph->bitmap.width; sizlBitmap.cy = ftglyph->bitmap.rows; diff --git a/drivers/video/font/ftfd/tttables.c b/drivers/video/font/ftfd/tttables.c index b40b4c5ea16..40dbf3bfa9e 100644 --- a/drivers/video/font/ftfd/tttables.c +++ b/drivers/video/font/ftfd/tttables.c @@ -29,7 +29,7 @@ CalcTableChecksum(PVOID pvTable, ULONG cjTable) * \brief Searches for a specific table in TrueType and OpenType font files * \param pvView - The address where the font file is mapped * \param cjView - Size of the mapped font file - * \param iFace - 1-based index of the font in the font file. + * \param ulFont - 1-based index of the font in the font file. * \param ulTag - Identifier tag of the table to search * \param pulLength - Pointer to an ULONG that recieves the table length, * Can be NULL.