From 33c90e3133b50cdd6be75501c1bd3e636d2ea4c1 Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 17 Aug 2007 07:32:10 +0000 Subject: [PATCH] (run_stages): Fix handling of padding. --- src/m17n-flt.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/m17n-flt.c b/src/m17n-flt.c index bdc1d9e..7f16cf3 100644 --- a/src/m17n-flt.c +++ b/src/m17n-flt.c @@ -1893,19 +1893,16 @@ run_stages (MFLTGlyphString *gstring, int from, int to, g = GREF (ctx->out, i); if (! GET_COMBINING_CODE (g)) { - if (GET_LEFT_PADDING (g) && g->lbearing < 0) + if (GET_RIGHT_PADDING (g) && g->rbearing > g->xadv) { - g->xoff -= g->lbearing; - if (g->rbearing < 0) - g->xadv = g->rbearing - g->lbearing; - else - g->xadv += g->xoff; - g->rbearing += g->xoff; - g->lbearing = 0; + g->xadv = g->rbearing; } - if (i > 0 && GET_RIGHT_PADDING (g) && g->rbearing > g->xadv) + if (GET_LEFT_PADDING (g) && g->lbearing < 0) { - g->xadv = g->rbearing; + g->xoff += - g->lbearing; + g->xadv += - g->lbearing; + g->rbearing += - g->lbearing; + g->lbearing = 0; } } } -- 1.7.10.4