X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fdraw.c;h=1fef78a1c1885be74b2aca4c771d59daa492c4c9;hb=1b7bcea372680c0e52493e54e3b4c2e16744101d;hp=50257590428eaae01e0e672574a2ec578e403745;hpb=1e777b7ceead8d549358360a01edc735be2d1a53;p=m17n%2Fm17n-lib.git diff --git a/src/draw.c b/src/draw.c index 5025759..1fef78a 100644 --- a/src/draw.c +++ b/src/draw.c @@ -225,9 +225,10 @@ visual_order (MGlyphString *gstring) for (i = 1; i < gstring->used - 1; i++) { MGlyph *g = gstring->glyphs + i; + int level = g->bidi_level; for (j = i; g->g.from == gstring->glyphs[j + 1].g.from; j++); - if (j > i) + if ((level % 2) && j > i) { memcpy (glyphs + i, gstring->glyphs + i, sizeof (MGlyph) * (j - i + 1)); @@ -483,6 +484,8 @@ compose_glyph_string (MFrame *frame, MText *mt, int from, int to, break; } } + if (this_script == Minherited || this_script == Mcommon) + this_script = (MSymbol) mchar_get_prop (c, Mblock); } pos = g->g.from;