*** empty log message ***
[m17n/m17n-test.git] / flt.c
diff --git a/flt.c b/flt.c
index d7cf04a..95145d5 100644 (file)
--- a/flt.c
+++ b/flt.c
@@ -368,11 +368,8 @@ drive_otf (MFLTFont *font, MFLT_OTF_Spec *spec,
       MFLTGlyph *base = NULL, *mark = NULL, *g;
       int x_ppem, y_ppem, x_scale, y_scale;
 
-      if (OTF_check_features (otf, 1,
-                             spec->script, spec->langsys,
-                             spec->gpos, spec->gpos_count) != 1
-         || (OTF_drive_gpos (otf, &otf_gstring, script, langsys,
-                             gpos_features) < 0))
+      if (OTF_drive_gpos (otf, &otf_gstring, script, langsys, gpos_features)
+         < 0)
        return to;
 
       face = ((FontInfo *) font)->face;
@@ -418,7 +415,7 @@ drive_otf (MFLTFont *font, MFLT_OTF_Spec *spec,
                  adjustment[i].yadv
                    += otfg->f.f1.value->YAdvance * y_scale / 0x10000;
                if (format & OTF_YAdvDevice)
-                 adjustment[i].xadv
+                 adjustment[i].yadv
                    += DEVICE_DELTA (otfg->f.f1.value->YAdvDevice, y_ppem);
                adjustment[i].set = 1;
              }
@@ -771,33 +768,27 @@ setup_features (int gsubp, FontInfoHB *font_info, MFLT_OTF_Spec *spec,
   if (req_feature != 0xFFFF)
     info->indices[i++] = req_feature;
   for (j = 0; j < preordered; j++)
-    {
-      if ((err = (gsubp
-                 ? HB_GSUB_Select_Feature (font_info->gsub, features[j],
-                                           script, langsys, &index)
-                 : HB_GPOS_Select_Feature (font_info->gpos, features[j],
-                                           script, langsys, &index)))
-         != HB_Err_Ok)
-       return err;
+    if ((err = (gsubp
+               ? HB_GSUB_Select_Feature (font_info->gsub, features[j],
+                                         script, langsys, &index)
+               : HB_GPOS_Select_Feature (font_info->gpos, features[j],
+                                         script, langsys, &index)))
+       == HB_Err_Ok)
       info->indices[i++] = index;
-    }
   if (feature_list)
     for (j = 0; feature_list[j]; j++)
       {
        for (k = preordered + 1; k < count; k++)
          if (feature_list[j] == features[k])
            break;
-       if (k == count)
-         {
-           if ((gsubp
+       if (k == count
+           && ((gsubp
                 ? HB_GSUB_Select_Feature (font_info->gsub, feature_list[j],
                                           script, langsys, &index)
                 : HB_GPOS_Select_Feature (font_info->gpos, feature_list[j],
                                           script, langsys, &index))
-               != FT_Err_Ok)
-             return -1;
-           info->indices[i++] = index;
-         }
+               == FT_Err_Ok))
+         info->indices[i++] = index;
       }
   info->count = i;
   return HB_Err_Ok;