From: handa Date: Thu, 16 Aug 2007 12:20:29 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0d6f0e3fd2057d9f3906fea81b6778497f9f2eb;p=m17n%2Fm17n-test.git *** empty log message *** --- 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++)