X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-test.git;a=blobdiff_plain;f=flt.c;h=d79cfece553ad033745203f1f3ef098d3bee9b35;hp=95145d596cebc0a132d092b581d8133647626e78;hb=b0d6f0e3fd2057d9f3906fea81b6778497f9f2eb;hpb=3e105a2d160d9c29e23d1ab79a237f5e7bd6ee14 diff --git a/flt.c b/flt.c index 95145d5..d79cfec 100644 --- a/flt.c +++ b/flt.c @@ -826,7 +826,6 @@ drive_otf (MFLTFont *font, MFLT_OTF_Spec *spec, GsubGposInfo *ginfo; HB_UShort *apply_order_save; HB_UShort apply_count_save; - int apply_saved = 0; int gpos_applied = 0; HB_Error err; @@ -851,10 +850,11 @@ drive_otf (MFLTFont *font, MFLT_OTF_Spec *spec, goto simple_copy; apply_order_save = font_info->gsub->FeatureList.ApplyOrder; apply_count_save = font_info->gsub->FeatureList.ApplyCount; - apply_saved = 1; font_info->gsub->FeatureList.ApplyOrder = ginfo->gsub.indices; font_info->gsub->FeatureList.ApplyCount = ginfo->gsub.count; err = HB_GSUB_Apply_String (font_info->gsub, buf); + font_info->gsub->FeatureList.ApplyOrder = apply_order_save; + font_info->gsub->FeatureList.ApplyCount = apply_count_save; if (err != HB_Err_Ok && err != HB_Err_Not_Covered) goto simple_copy; if (out->used + buf->in_length > out->allocated) @@ -864,26 +864,18 @@ drive_otf (MFLTFont *font, MFLT_OTF_Spec *spec, if (ginfo->gpos.count > 0 && (font_info->gpos || load_gpos (font_info) == HB_Err_Ok)) { - if (! apply_saved) - { - apply_order_save = font_info->gsub->FeatureList.ApplyOrder; - apply_count_save = font_info->gsub->FeatureList.ApplyCount; - apply_saved = 1; - } + apply_order_save = font_info->gpos->FeatureList.ApplyOrder; + apply_count_save = font_info->gpos->FeatureList.ApplyCount; font_info->gpos->FeatureList.ApplyOrder = ginfo->gpos.indices; font_info->gpos->FeatureList.ApplyCount = ginfo->gpos.count; err = HB_GPOS_Apply_String (&font_info->hb_font, font_info->gpos, FT_LOAD_DEFAULT, buf, FALSE, FALSE); + font_info->gpos->FeatureList.ApplyOrder = apply_order_save; + font_info->gpos->FeatureList.ApplyCount = apply_count_save; if (err == HB_Err_Ok) gpos_applied = 1; } - if (apply_saved) - { - font_info->gsub->FeatureList.ApplyOrder = apply_order_save; - font_info->gsub->FeatureList.ApplyCount = apply_count_save; - } - gidx = out->used; for (i = 0; i < buf->in_length; i++)