GsubGposInfo *ginfo;
HB_UShort *apply_order_save;
HB_UShort apply_count_save;
- int apply_saved = 0;
int gpos_applied = 0;
HB_Error err;
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)
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++)