Make shaper's override_features() override user features as well

The override_features is used to override features that are normally
discretionary features, but in a specific shaper are for various
reasons desired to be bolted on or off, because they've been used
for inherent shaping.  As such, it makes sense that they also
override user features.  Ie. if user turned 'liga' on, we don't
want Khmer shaping to become broken...  Or turn 'clig' off...

Fixes https://github.com/harfbuzz/harfbuzz/issues/1310
This commit is contained in:
Behdad Esfahbod 2018-11-29 12:32:47 -05:00
parent a95d9d8c84
commit 000d4b128e
1 changed files with 3 additions and 3 deletions

View File

@ -309,9 +309,6 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
map->enable_feature (HB_TAG ('v','e','r','t'), F_GLOBAL_SEARCH);
}
if (planner->shaper->override_features)
planner->shaper->override_features (planner);
for (unsigned int i = 0; i < num_user_features; i++)
{
const hb_feature_t *feature = &user_features[i];
@ -330,6 +327,9 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
aat_map->add_feature (feature->tag, feature->value);
}
}
if (planner->shaper->override_features)
planner->shaper->override_features (planner);
}