From: handa Date: Fri, 17 Aug 2007 07:32:10 +0000 (+0000) Subject: (run_stages): Fix handling of padding. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33c90e3133b50cdd6be75501c1bd3e636d2ea4c1;p=m17n%2Fm17n-lib.git (run_stages): Fix handling of padding. --- 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; } } }