From: handa Date: Tue, 6 Nov 2007 07:26:13 +0000 (+0000) Subject: (visual_order): Don't rely on the width of glyphs. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4f12fa6be5cd69c4e5d93ab8b9bfc964f2b249df;p=m17n%2Fm17n-lib.git (visual_order): Don't rely on the width of glyphs. (run_flt): Fix culculation of g->g.to. --- diff --git a/src/draw.c b/src/draw.c index 78f622d..6d81532 100644 --- a/src/draw.c +++ b/src/draw.c @@ -197,8 +197,7 @@ visual_order (MGlyphString *gstring) #endif /* HAVE_FRIBIDI */ g->bidi_level = levels[i]; for (seglen = 1, g++; - i + seglen < len && (glyphs[i].g.from == glyphs[i + seglen].g.from - || glyphs[i + seglen].g.xadv == 0); + i + seglen < len && glyphs[i].g.from == glyphs[i + seglen].g.from; seglen++, g++) { g->bidi_level = levels[i]; @@ -276,7 +275,7 @@ run_flt (MGlyphString *gstring, int from, int to, MRealizedFont *rfont, MGlyph *g = MGLYPH (i); g->g.from += from_pos - from; - g->g.to += from_pos + 1; + g->g.to += from_pos - from + 1; g->g.xadv >>= 6; g->g.yadv >>= 6; g->g.ascent >>= 6;