| Index: third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
|
| diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
|
| index 32159002e9344e22ef3c283e857e56e2f90cf69d..96f24946165f362dd560812b4496baa3fd734f54 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
|
| +++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
|
| @@ -154,6 +154,18 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
|
| return found;
|
| }
|
|
|
| +static bool
|
| +disable_otl_hebrew (const hb_ot_shape_plan_t *plan)
|
| +{
|
| + /* For Hebrew shaper, use fallback if GPOS does not have 'hebr'
|
| + * script. This matches Uniscribe better, and makes fonts like
|
| + * Arial that have GSUB/GPOS/GDEF but no data for Hebrew work.
|
| + * See:
|
| + * https://github.com/behdad/harfbuzz/issues/347#issuecomment-267838368
|
| + */
|
| + return plan->map.chosen_script[1] != HB_TAG ('h','e','b','r');
|
| +}
|
| +
|
|
|
| const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
|
| {
|
| @@ -168,6 +180,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
|
| NULL, /* decompose */
|
| compose_hebrew,
|
| NULL, /* setup_masks */
|
| + disable_otl_hebrew,
|
| HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
|
| true, /* fallback_position */
|
| };
|
|
|