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:
parent
a95d9d8c84
commit
000d4b128e
|
@ -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);
|
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++)
|
for (unsigned int i = 0; i < num_user_features; i++)
|
||||||
{
|
{
|
||||||
const hb_feature_t *feature = &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);
|
aat_map->add_feature (feature->tag, feature->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (planner->shaper->override_features)
|
||||||
|
planner->shaper->override_features (planner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue