From 8db06bebbf1c89b1bfe30e3d0565f358a6e53e57 Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 17 Aug 2007 07:30:27 +0000 Subject: [PATCH] (mfont__flt_run): Pay attention to padding on printing debug info. --- src/font-flt.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/font-flt.c b/src/font-flt.c index a0a71d0..bfef0ab 100644 --- a/src/font-flt.c +++ b/src/font-flt.c @@ -1556,12 +1556,20 @@ mfont__flt_run (MGlyphString *gstring, int from, int to, MRealizedFace *rface) for (i = 0; from < to; from++, i++) { MGlyph *g; + int width, xoff, yoff; if (i > 0 && i % 4 == 0) MDEBUG_PRINT ("\n [FLT] "); g = MGLYPH (from); - MDEBUG_PRINT4 (" (%04X %d %d %d)", - g->code, g->width, g->xoff, g->yoff); + width = g->width, xoff = g->xoff, yoff = g->yoff; + if (g->right_padding && g->rbearing > g->width) + width = g->rbearing; + if (g->left_padding && g->lbearing < 0) + { + width += - g->lbearing; + xoff += - g->lbearing; + } + MDEBUG_PRINT4 (" (%04X %d %d %d)", g->code, width, xoff, yoff); } else for (; from < to; from++) -- 1.7.10.4