diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index d397dded1..20dbac2be 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -111,13 +111,15 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, plan.rtlm_mask = plan.map.get_1_mask (HB_TAG ('r','t','l','m')); hb_tag_t kern_tag = HB_DIRECTION_IS_HORIZONTAL (props.direction) ? HB_TAG ('k','e','r','n') : HB_TAG ('v','k','r','n'); +#ifndef HB_NO_OT_KERN plan.kern_mask = plan.map.get_mask (kern_tag); + plan.requested_kerning = !!plan.kern_mask; +#endif #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; 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 01f6afa3d..fec8983c6 100644 --- a/src/hb-ot-shape.hh +++ b/src/hb-ot-shape.hh @@ -73,14 +73,22 @@ struct hb_ot_shape_plan_t static constexpr hb_mask_t dnom_mask = 0; #endif hb_mask_t rtlm_mask; +#ifndef HB_NO_OT_KERN hb_mask_t kern_mask; +#else + static constexpr hb_mask_t kern_mask = 0; +#endif #ifndef HB_NO_SHAPE_AAT hb_mask_t trak_mask; #else static constexpr hb_mask_t trak_mask = 0; #endif +#ifndef HB_NO_OT_KERN bool requested_kerning : 1; +#else + static constexpr bool requested_kerning = false; +#endif #ifndef HB_NO_SHAPE_AAT bool requested_tracking : 1; #else