*** empty log message ***
[m17n/m17n-lib.git] / src / m17n-flt.c
index 644a0b6..e082fe3 100644 (file)
@@ -257,9 +257,9 @@ enum GlyphInfoMask
 {
   CategoryCodeMask = 0x7F,
   CombiningCodeMask = 0xFFFFFF,
-  CombinedMask = 1 << 27,
-  LeftPaddingMask = 1 << 28,
-  RightPaddingMask = 1 << 29
+  CombinedMask = 1 << 28,
+  LeftPaddingMask = 1 << 29,
+  RightPaddingMask = 1 << 30
 };
 
 #define SET_GLYPH_INFO(g, mask, ctx, info)                     \
@@ -1875,6 +1875,8 @@ decode_packed_otf_tag (FontLayoutContext *ctx, MFLTGlyphString *gstring,
       unsigned int tag = g->internal & 0xFFFFFFF;
       char enc;
 
+      if (GET_COMBINED (g))
+       continue;
       if (! category)
        {
          SET_CATEGORY_CODE (g, 0);
@@ -2016,7 +2018,6 @@ try_otf (int depth, MFLTOtfSpec *otf_spec, int from, int to,
         FontLayoutContext *ctx)
 {
   MFLTFont *font = ctx->font;
-  int from_idx = ctx->out->used;
 
   if (MDEBUG_FLAG () > 2)
     MDEBUG_PRINT3 ("\n [FLT] %*s%s", depth, "", MSYMBOL_NAME (otf_spec->sym));
@@ -2052,9 +2053,6 @@ try_otf (int depth, MFLTOtfSpec *otf_spec, int from, int to,
   font->get_glyph_id (font, ctx->in, from, to);
   if (mflt_try_otf)
     {
-      int out_len;
-      int i;
-
       to = mflt_try_otf (font, otf_spec, ctx->in, from, to);
       if (to < 0)
        return from;
@@ -2317,7 +2315,8 @@ run_stages (MFLTGlyphString *gstring, int from, int to,
                     : g->code
                     ? (int) mchartable_lookup (table, g->code)
                     : ' ');
-             SET_CATEGORY_CODE (g, enc);
+             if (! GET_COMBINED (g))
+               SET_CATEGORY_CODE (g, enc);
            }
          else
            enc = GET_CATEGORY_CODE (g);