[khmer] Move 'clig' to overrides
Prerequisite for https://github.com/harfbuzz/harfbuzz/issues/1310
diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc
index 497891e..8b6ec51 100644
--- a/src/hb-ot-shape-complex-khmer.cc
+++ b/src/hb-ot-shape-complex-khmer.cc
@@ -127,22 +127,25 @@
for (; i < KHMER_NUM_FEATURES; i++)
map->add_feature (khmer_features[i]);
-
- map->enable_feature (HB_TAG('c','a','l','t'));
- map->enable_feature (HB_TAG('c','l','i','g'));
-
}
static void
override_features_khmer (hb_ot_shape_planner_t *plan)
{
+ hb_ot_map_builder_t *map = &plan->map;
+
+ /* Khmer spec has 'clig' as part of required shaping features:
+ * "Apply feature 'clig' to form ligatures that are desired for
+ * typographical correctness.", hence in overrides... */
+ map->enable_feature (HB_TAG('c','l','i','g'));
+
/* Uniscribe does not apply 'kern' in Khmer. */
if (hb_options ().uniscribe_bug_compatible)
{
- plan->map.disable_feature (HB_TAG('k','e','r','n'));
+ map->disable_feature (HB_TAG('k','e','r','n'));
}
- plan->map.disable_feature (HB_TAG('l','i','g','a'));
+ map->disable_feature (HB_TAG('l','i','g','a'));
}