(mfont__flt_run): Pay attention to padding on
authorhanda <handa>
Fri, 17 Aug 2007 07:30:27 +0000 (07:30 +0000)
committerhanda <handa>
Fri, 17 Aug 2007 07:30:27 +0000 (07:30 +0000)
printing debug info.

src/font-flt.c

index a0a71d0..bfef0ab 100644 (file)
@@ -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++)