From: handa Date: Wed, 28 Jun 2006 11:20:57 +0000 (+0000) Subject: (MbidiNSM): New variable. X-Git-Tag: REL-1-3-4~149 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5490b251ffaf1e138295b4766226d8948a0d503f;p=m17n%2Fm17n-lib.git (MbidiNSM): New variable. (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay attention to bidi type NSM. (mdraw__init): Initialize MbibiNSM. --- diff --git a/src/draw.c b/src/draw.c index c65da26..2efae70 100644 --- a/src/draw.c +++ b/src/draw.c @@ -97,6 +97,7 @@ static MSymbol MbidiRLE; static MSymbol MbidiRLO; static MSymbol MbidiBN; static MSymbol MbidiS; +static MSymbol MbidiNSM; static void visual_order (MGlyphString *gstring) @@ -116,6 +117,8 @@ visual_order (MGlyphString *gstring) int *logical = alloca (sizeof (int) * len); int *indices; char *levels = alloca (len); + + memset (levels, 0, sizeof (int) * len); #endif /* not HAVE_FRIBIDI */ for (g = MGLYPH (1), i = 0; g->type != GLYPH_ANCHOR; g++, i++) @@ -136,6 +139,10 @@ visual_order (MGlyphString *gstring) levels[i] = 1; #endif /* not HAVE_FRIBIDI */ } +#ifndef HAVE_FRIBIDI + else if (bidi == MbidiNSM && i > 0 && levels[i - 1]) + levels[i] = 1; +#endif /* not HAVE_FRIBIDI */ } logical[i] = g->c; } @@ -1875,6 +1882,7 @@ mdraw__init () MbidiRLO = msymbol ("RLO"); MbidiBN = msymbol ("BN"); MbidiS = msymbol ("S"); + MbidiNSM = msymbol ("NSM"); #ifdef HAVE_FRIBIDI fribidi_set_mirroring (TRUE); #endif