From: handa Date: Fri, 25 Nov 2005 06:44:08 +0000 (+0000) Subject: (layout_glyphs): Fix handling of left/righ_padding. X-Git-Tag: REL-1-3-0~53 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea68b0d902dd9c688bb165f9dc1972976bd14a1f;p=m17n%2Fm17n-lib.git (layout_glyphs): Fix handling of left/righ_padding. --- diff --git a/src/draw.c b/src/draw.c index 01abd7d..0d1d48b 100644 --- a/src/draw.c +++ b/src/draw.c @@ -605,7 +605,10 @@ layout_glyphs (MFrame *frame, MGlyphString *gstring, int from, int to, if (base->left_padding && base->lbearing < 0) { base->xoff = - base->lbearing; - base->width += base->xoff; + if (base->rbearing < 0) + base->width = base->rbearing - base->lbearing; + else + base->width += base->xoff; base->rbearing += base->xoff; base->lbearing = 0; } @@ -613,9 +616,8 @@ layout_glyphs (MFrame *frame, MGlyphString *gstring, int from, int to, { base->width = base->rbearing; } - lbearing = (base->xoff + base->lbearing < 0 - ? base->xoff + base->lbearing : 0); - rbearing = base->xoff + base->rbearing; + lbearing = base->lbearing; + rbearing = base->rbearing; } else {