From 43d7048d59b1a0af62b80bd914805bdec74a29d2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 19 Jun 2019 17:02:32 -0700 Subject: [PATCH] [config] More trak disabling Part of https://github.com/harfbuzz/harfbuzz/issues/1652 --- src/hb-ot-shape.cc | 4 +++- src/hb-ot-shape.hh | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 4bc91c2..d397dde 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -112,10 +112,12 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, hb_tag_t kern_tag = HB_DIRECTION_IS_HORIZONTAL (props.direction) ? HB_TAG ('k','e','r','n') : HB_TAG ('v','k','r','n'); plan.kern_mask = plan.map.get_mask (kern_tag); +#ifndef HB_NO_SHAPE_AAT plan.trak_mask = plan.map.get_mask (HB_TAG ('t','r','a','k')); + plan.requested_tracking = !!plan.trak_mask; +#endif plan.requested_kerning = !!plan.kern_mask; - plan.requested_tracking = !!plan.trak_mask; bool has_gpos_kern = plan.map.get_feature_index (1, kern_tag) != HB_OT_LAYOUT_NO_FEATURE_INDEX; bool disable_gpos = plan.shaper->gpos_tag && plan.shaper->gpos_tag != plan.map.chosen_script[1]; diff --git a/src/hb-ot-shape.hh b/src/hb-ot-shape.hh index 452da63..01f6afa 100644 --- a/src/hb-ot-shape.hh +++ b/src/hb-ot-shape.hh @@ -74,10 +74,18 @@ struct hb_ot_shape_plan_t #endif hb_mask_t rtlm_mask; hb_mask_t kern_mask; +#ifndef HB_NO_SHAPE_AAT hb_mask_t trak_mask; +#else + static constexpr hb_mask_t trak_mask = 0; +#endif bool requested_kerning : 1; +#ifndef HB_NO_SHAPE_AAT bool requested_tracking : 1; +#else + static constexpr bool requested_tracking = false; +#endif #ifndef HB_NO_OT_SHAPE_FRACTIONS bool has_frac : 1; #else -- 2.7.4