(run_rule): Don't set error code here.
authorhanda <handa>
Tue, 6 Nov 2007 04:46:44 +0000 (04:46 +0000)
committerhanda <handa>
Tue, 6 Nov 2007 04:46:44 +0000 (04:46 +0000)
(run_cond): Likewise.
(run_otf): Fix handling of advance_is_absolute.
(run_command): Don't set error code here.

src/m17n-flt.c

index dcc610f..d5950fa 100644 (file)
@@ -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;
     }