From f4de0c775408e34474a688361fa319251e1a9c18 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 19 Jun 2019 17:08:26 -0700 Subject: [PATCH] [config] Disable AAT map Part of https://github.com/harfbuzz/harfbuzz/issues/1652 --- src/hb-aat-map.cc | 15 +++++++-------- src/hb-ot-shape.cc | 6 ++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/hb-aat-map.cc b/src/hb-aat-map.cc index d57ee84..e16ecfe 100644 --- a/src/hb-aat-map.cc +++ b/src/hb-aat-map.cc @@ -26,6 +26,10 @@ * Google Author(s): Behdad Esfahbod */ +#include "hb.hh" + +#ifndef HB_NO_SHAPE_AAT + #include "hb-aat-map.hh" #include "hb-aat-layout.hh" @@ -34,10 +38,6 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag, unsigned int value) { -#ifdef HB_NO_SHAPE_AAT - return; -#endif - if (tag == HB_TAG ('a','a','l','t')) { feature_info_t *info = features.push(); @@ -57,10 +57,6 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag, void hb_aat_map_builder_t::compile (hb_aat_map_t &m) { -#ifdef HB_NO_SHAPE_AAT - return; -#endif - /* Sort features and merge duplicates */ if (features.length) { @@ -74,3 +70,6 @@ hb_aat_map_builder_t::compile (hb_aat_map_t &m) hb_aat_layout_compile_map (this, &m); } + + +#endif diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 20dbac2..7690c22 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -98,8 +98,10 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, plan.props = props; plan.shaper = shaper; map.compile (plan.map, key); +#ifndef HB_NO_SHAPE_AAT if (apply_morx) aat_map.compile (plan.aat_map); +#endif #ifndef HB_NO_OT_SHAPE_FRACTIONS plan.frac_mask = plan.map.get_1_mask (HB_TAG ('f','r','a','c')); @@ -201,7 +203,9 @@ hb_ot_shape_plan_t::init0 (hb_face_t *face, const hb_shape_plan_key_t *key) { map.init (); +#ifndef HB_NO_SHAPE_AAT aat_map.init (); +#endif hb_ot_shape_planner_t planner (face, &key->props); @@ -229,7 +233,9 @@ hb_ot_shape_plan_t::fini () shaper->data_destroy (const_cast (data)); map.fini (); +#ifndef HB_NO_SHAPE_AAT aat_map.fini (); +#endif } void -- 2.7.4