[shaper] Disable dumber shaper if no AAT

This commit is contained in:
Behdad Esfahbod 2022-11-24 13:49:29 -07:00
parent e9f964c01a
commit 73046d53e5
2 changed files with 4 additions and 0 deletions

View File

@ -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_zero_marks = shaper->zero_width_marks != HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE;
script_fallback_mark_positioning = shaper->fallback_position; script_fallback_mark_positioning = shaper->fallback_position;
#ifndef HB_NO_AAT_SHAPE
/* https://github.com/harfbuzz/harfbuzz/issues/1528 */ /* https://github.com/harfbuzz/harfbuzz/issues/1528 */
if (apply_morx && shaper != &_hb_ot_shaper_default) if (apply_morx && shaper != &_hb_ot_shaper_default)
shaper = &_hb_ot_shaper_dumber; shaper = &_hb_ot_shaper_dumber;
#endif
} }
void void

View File

@ -49,6 +49,7 @@ const hb_ot_shaper_t _hb_ot_shaper_default =
true, /* fallback_position */ true, /* fallback_position */
}; };
#ifndef HB_NO_AAT_SHAPE
/* Same as default but no mark advance zeroing / fallback positioning. /* Same as default but no mark advance zeroing / fallback positioning.
* Dumbest shaper ever, basically. */ * Dumbest shaper ever, basically. */
const hb_ot_shaper_t _hb_ot_shaper_dumber = 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, HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
false, /* fallback_position */ false, /* fallback_position */
}; };
#endif
#endif #endif