From 73046d53e5e769ec8c4eff2a1b8306bb15ce0cce Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 24 Nov 2022 13:49:29 -0700 Subject: [PATCH] [shaper] Disable dumber shaper if no AAT --- src/hb-ot-shape.cc | 2 ++ src/hb-ot-shaper-default.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 64aa74a9d..bbdfc214a 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -91,9 +91,11 @@ hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *fac script_zero_marks = shaper->zero_width_marks != HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE; script_fallback_mark_positioning = shaper->fallback_position; +#ifndef HB_NO_AAT_SHAPE /* https://github.com/harfbuzz/harfbuzz/issues/1528 */ if (apply_morx && shaper != &_hb_ot_shaper_default) shaper = &_hb_ot_shaper_dumber; +#endif } void diff --git a/src/hb-ot-shaper-default.cc b/src/hb-ot-shaper-default.cc index 2f6f499ee..f0404a4d2 100644 --- a/src/hb-ot-shaper-default.cc +++ b/src/hb-ot-shaper-default.cc @@ -49,6 +49,7 @@ const hb_ot_shaper_t _hb_ot_shaper_default = true, /* fallback_position */ }; +#ifndef HB_NO_AAT_SHAPE /* Same as default but no mark advance zeroing / fallback positioning. * Dumbest shaper ever, basically. */ const hb_ot_shaper_t _hb_ot_shaper_dumber = @@ -68,6 +69,7 @@ const hb_ot_shaper_t _hb_ot_shaper_dumber = HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE, false, /* fallback_position */ }; +#endif #endif