From 5130c90ac0173c542b550049c93738ab5de84bb9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 Jun 2019 14:29:39 -0700 Subject: [PATCH] [config] Add HB_NO_EMOJI Part of https://github.com/harfbuzz/harfbuzz/issues/1652 --- src/hb-config.hh | 1 + src/hb-ot-shape.cc | 2 ++ src/hb-unicode.cc | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/hb-config.hh b/src/hb-config.hh index adf2b3348..6a95501d7 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -58,6 +58,7 @@ #define HB_NO_BITMAP #define HB_NO_CFF #define HB_NO_COLOR +#define HB_NO_EMOJI #define HB_NO_FACE_COLLECT_UNICODES #define HB_NO_GETENV #define HB_NO_HINTING diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index c659f28ca..7ae0925a0 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -479,6 +479,7 @@ hb_set_unicode_props (hb_buffer_t *buffer) { _hb_glyph_info_set_continuation (&info[i]); } +#ifndef HB_NO_EMOJI else if (unlikely (_hb_glyph_info_is_zwj (&info[i]))) { _hb_glyph_info_set_continuation (&info[i]); @@ -490,6 +491,7 @@ hb_set_unicode_props (hb_buffer_t *buffer) _hb_glyph_info_set_continuation (&info[i]); } } +#endif /* Or part of the Other_Grapheme_Extend that is not marks. * As of Unicode 11 that is just: * diff --git a/src/hb-unicode.cc b/src/hb-unicode.cc index 9ec2d8563..eb9451c60 100644 --- a/src/hb-unicode.cc +++ b/src/hb-unicode.cc @@ -570,6 +570,7 @@ _hb_modified_combining_class[256] = /* * Emoji */ +#ifndef HB_NO_EMOJI #include "hb-unicode-emoji-table.hh" @@ -581,3 +582,4 @@ _hb_unicode_is_emoji_Extended_Pictographic (hb_codepoint_t cp) sizeof (hb_unicode_range_t), hb_unicode_range_t::cmp); } +#endif