From 34ae828465994faf4db6389f0ac61f0e28fb4eaa Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 6 Nov 2007 04:46:44 +0000 Subject: [PATCH] (run_rule): Don't set error code here. (run_cond): Likewise. (run_otf): Fix handling of advance_is_absolute. (run_command): Don't set error code here. --- src/m17n-flt.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/m17n-flt.c b/src/m17n-flt.c index dcc610f..d5950fa 100644 --- a/src/m17n-flt.c +++ b/src/m17n-flt.c @@ -1524,7 +1524,7 @@ run_rule (int depth, } pos = run_command (depth, rule->cmd_ids[i], from, to, ctx); if (pos < 0) - MERROR (MERROR_DRAW, -1); + return pos; consumed = pos > from; if (consumed) from = pos; @@ -1554,7 +1554,7 @@ run_cond (int depth, break; } if (pos < 0) - MERROR (MERROR_DRAW, -1); + return pos; if (MDEBUG_FLAG () > 2) MDEBUG_PRINT (")"); return (pos); @@ -1611,18 +1611,15 @@ run_otf (int depth, MFLTGlyph *g = GREF (ctx->out, from_idx + i); SET_MEASURED (g, 1); - if (a->xadv || a->yadv) + if (a->advance_is_absolute) { - if (a->advance_is_absolute) - { - g->xadv = a->xadv; - g->yadv = a->yadv; - } - else - { - g->xadv += a->xadv; - g->yadv += a->yadv; - } + g->xadv = a->xadv; + g->yadv = a->yadv; + } + else if (a->xadv || a->yadv) + { + g->xadv += a->xadv; + g->yadv += a->yadv; } if (a->xoff || a->yoff) { @@ -1743,8 +1740,6 @@ run_command (int depth, int id, int from, int to, FontLayoutContext *ctx) to = run_cond (depth, &cmd->body.cond, from, to, ctx); else if (cmd->type == FontLayoutCmdTypeOTF) to = run_otf (depth, &cmd->body.otf, from, to, ctx); - if (to < 0) - MERROR (MERROR_FLT, -1); return to; } -- 1.7.10.4