From 4f12fa6be5cd69c4e5d93ab8b9bfc964f2b249df Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 6 Nov 2007 07:26:13 +0000 Subject: [PATCH] (visual_order): Don't rely on the width of glyphs. (run_flt): Fix culculation of g->g.to. --- src/draw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 1.7.10.4