summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
index 34cf28b8e2..334d3ded82 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
+++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
@@ -24,7 +24,11 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-private.hh"
+#include "hb.hh"
+
+#ifndef HB_NO_OT_SHAPE
+
+#include "hb-ot-shape-complex.hh"
static bool
@@ -70,7 +74,11 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
bool found = (bool) c->unicode->compose (a, b, ab);
- if (!found && !c->plan->has_mark)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
+ return found;
+#endif
+
+ if (!found && !c->plan->has_gpos_mark)
{
/* Special-case Hebrew presentation forms that are excluded from
* standard normalization, but wanted for old fonts. */
@@ -154,18 +162,6 @@ 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/harfbuzz/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 =
{
@@ -179,8 +175,11 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
nullptr, /* decompose */
compose_hebrew,
nullptr, /* setup_masks */
- disable_otl_hebrew,
+ HB_TAG ('h','e','b','r'), /* gpos_tag. https://github.com/harfbuzz/harfbuzz/issues/347#issuecomment-267838368 */
nullptr, /* reorder_marks */
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
true, /* fallback_position */
};
+
+
+#endif