diff --git a/src/hb-common.cc b/src/hb-common.cc index 0ae0c05f4..5b8927a8a 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -69,7 +69,6 @@ _hb_options_init () if (0 == strncmp (c, name, p - c) && strlen (name) == static_cast(p - c)) do { u.opts.symbol = true; } while (0) OPTION ("uniscribe-bug-compatible", uniscribe_bug_compatible); - OPTION ("aat", aat); #undef OPTION diff --git a/src/hb-debug.hh b/src/hb-debug.hh index a7e52c8cb..bd807f641 100644 --- a/src/hb-debug.hh +++ b/src/hb-debug.hh @@ -46,7 +46,6 @@ struct hb_options_t bool unused : 1; /* In-case sign bit is here. */ bool initialized : 1; bool uniscribe_bug_compatible : 1; - bool aat : 1; }; union hb_options_union_t { diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index ac6551b6b..cfc41df9f 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -399,27 +399,6 @@ OT::GSUB::is_blacklisted (hb_blob_t *blob HB_UNUSED, #ifdef HB_NO_OT_LAYOUT_BLACKLIST return false; #endif - -#ifndef HB_NO_AAT_SHAPE - /* Mac OS X prefers morx over GSUB. It also ships with various Indic fonts, - * all by 'MUTF' foundry (Tamil MN, Tamil Sangam MN, etc.), that have broken - * GSUB/GPOS tables. Some have GSUB with zero scripts, those are ignored by - * our morx/GSUB preference code. But if GSUB has non-zero scripts, we tend - * to prefer it over morx because we want to be consistent with other OpenType - * shapers. - * - * To work around broken Indic Mac system fonts, we ignore GSUB table if - * OS/2 VendorId is 'MUTF' and font has morx table as well. - * - * https://github.com/harfbuzz/harfbuzz/issues/1410 - * https://github.com/harfbuzz/harfbuzz/issues/1348 - * https://github.com/harfbuzz/harfbuzz/issues/1391 - */ - if (unlikely (face->table.OS2->achVendID == HB_TAG ('M','U','T','F') && - face->table.morx->has_data ())) - return true; -#endif - return false; } diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 77358e57e..b8bd12f0f 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -63,23 +63,6 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner, const hb_feature_t *user_features, unsigned int num_user_features); -#ifndef HB_NO_AAT_SHAPE -static inline bool -_hb_apply_morx (hb_face_t *face) -{ - if (hb_options ().aat && - hb_aat_layout_has_substitution (face)) - return true; - - /* Ignore empty GSUB tables. */ - return (!hb_ot_layout_has_substitution (face) || - !hb_ot_layout_table_get_script_tags (face, - HB_OT_TAG_GSUB, - 0, nullptr, nullptr)) && - hb_aat_layout_has_substitution (face); -} -#endif - hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *face, const hb_segment_properties_t *props) : face (face), @@ -87,7 +70,7 @@ hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *fac map (face, props), aat_map (face, props) #ifndef HB_NO_AAT_SHAPE - , apply_morx (_hb_apply_morx (face)) + , apply_morx (hb_aat_layout_has_substitution (face)) #endif { shaper = hb_ot_shape_complex_categorize (this); @@ -156,15 +139,11 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, if (0) ; #ifndef HB_NO_AAT_SHAPE - else if (hb_options ().aat && hb_aat_layout_has_positioning (face)) + else if (hb_aat_layout_has_positioning (face)) plan.apply_kerx = true; #endif else if (!apply_morx && !disable_gpos && hb_ot_layout_has_positioning (face)) plan.apply_gpos = true; -#ifndef HB_NO_AAT_SHAPE - else if (hb_aat_layout_has_positioning (face)) - plan.apply_kerx = true; -#endif if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos)) {