From eb10233b267909dee0245f126000e117f3b21c35 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 15 Oct 2013 15:26:44 +0200 Subject: [PATCH] [indic] Apply 'kern' for all scripts except for Khmer in Uniscribe mode Seems to better match Uniscribe. Note: NotoSansTelugu-Regular has kern feature, so this fixes most of the positioning failures there, except for the kern pairs blocked by a (non-)joiner, in which case we (correctly) kern, but Uniscribe doesn't. --- src/hb-ot-shape-complex-indic.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 7986ead6e..a279ff2cc 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -451,9 +451,16 @@ collect_features_indic (hb_ot_shape_planner_t *plan) static void override_features_indic (hb_ot_shape_planner_t *plan) { - /* Uniscribe does not apply 'kern'. */ + /* Uniscribe does not apply 'kern' in Khmer. */ if (hb_options ().uniscribe_bug_compatible) - plan->map.add_feature (HB_TAG('k','e','r','n'), 0, F_GLOBAL); + { + switch ((hb_tag_t) plan->props.script) + { + case HB_SCRIPT_KHMER: + plan->map.add_feature (HB_TAG('k','e','r','n'), 0, F_GLOBAL); + break; + } + } plan->map.add_feature (HB_TAG('l','i','g','a'), 0, F_GLOBAL); }