From: handa Date: Fri, 14 Sep 2007 05:02:41 +0000 (+0000) Subject: (run_otf): Make debug info printing comaptible with X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1486b59fa2646cd3ddbb7d746cd55fec6a4b4fc6;p=m17n%2Fm17n-lib.git (run_otf): Make debug info printing comaptible with that of m17n-flt.c. (run_command): Likewise. (mfont__flt_run): Likewise. --- diff --git a/src/font-flt.c b/src/font-flt.c index 3254446..6f05fbe 100644 --- a/src/font-flt.c +++ b/src/font-flt.c @@ -1125,11 +1125,16 @@ run_otf (int depth, int from_idx = gstring->used; if (MDEBUG_FLAG () > 2) +#if 0 MDEBUG_PRINT4 ("\n [FLT] %*s(OTF %s,%s)", depth, "", (! otf_cmd->features[MFONT_OTT_GSUB].str ? "" : otf_cmd->features[MFONT_OTT_GSUB].str), (! otf_cmd->features[MFONT_OTT_GPOS].str ? "" : otf_cmd->features[MFONT_OTT_GPOS].str)); +#else + MDEBUG_PRINT3 ("\n [FLT] %*s:otf=%s", depth, "", + MSYMBOL_NAME (otf_cmd->otf)); +#endif to = mfont__ft_drive_otf (gstring, from, to, otf_cmd); if (ctx->cluster_begin_idx) for (; from_idx < gstring->used; from_idx++) @@ -1224,7 +1229,12 @@ run_command (int depth, int id, MGlyphString *gstring, int from, int to, APPEND_GLYPH (gstring, g); UPDATE_CLUSTER_RANGE (ctx, g); if (MDEBUG_FLAG () > 2) - MDEBUG_PRINT3 ("\n [FLT] %*s(COPY 0x%X)", depth, "", g.code); + { + if (g.type == GLYPH_PAD) + MDEBUG_PRINT2 ("\n [FLT] %*s(COPY |)", depth, ""); + else + MDEBUG_PRINT3 ("\n [FLT] %*s(COPY 0x%X)", depth, "", g.code); + } ctx->code_offset = ctx->combining_code = ctx->left_padding = 0; return (from + 1); } @@ -1420,22 +1430,18 @@ mfont__flt_run (MGlyphString *gstring, int from, int to, MRealizedFace *rface) ctx.code_offset = ctx.combining_code = ctx.left_padding = 0; if (MDEBUG_FLAG () > 2) { - MDEBUG_PRINT2 ("\n [FLT] (STAGE %d \"%s\"", stage_idx, ctx.encoded); - if (ctx.encoded_offset < to) + MDEBUG_PRINT2 ("\n [FLT] (STAGE %d \"%s\"", stage_idx, + ctx.encoded + from - ctx.encoded_offset); + fprintf (stderr, " ("); + for (i = from; i < to ; i++) { - if (gstring->glyphs[ctx.encoded_offset].type == GLYPH_PAD) - fprintf (stderr, " (|"); + if (gstring->glyphs[i].type == GLYPH_PAD) + fprintf (stderr, "%*s|", (i > from), ""); else - fprintf (stderr, " (%X", gstring->glyphs[ctx.encoded_offset].code); - for (i = ctx.encoded_offset + 1; i < to; i++) - { - if (gstring->glyphs[i].type == GLYPH_PAD) - fprintf (stderr, " |"); - else - fprintf (stderr, " %X", gstring->glyphs[i].code); - } - fprintf (stderr, ")"); + fprintf (stderr, "%*s%04X", (i > from), "", + gstring->glyphs[i].code); } + fprintf (stderr, ")"); } gidx = gstring->used;