summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/break.c3
-rw-r--r--pango/pango-emoji-private.h3
-rw-r--r--pango/pango-emoji.c6
3 files changed, 11 insertions, 1 deletions
diff --git a/pango/break.c b/pango/break.c
index 355518eb..37be1c65 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -124,7 +124,8 @@ static const CharJamoProps HangulJamoProps[] = {
#define GREEK(wc) (((wc) >= 0x0370 && (wc) <= 0x3FF) || ((wc) >= 0x1F00 && (wc) <= 0x1FFF))
#define KANA(wc) ((wc) >= 0x3040 && (wc) <= 0x30FF)
#define HANGUL(wc) ((wc) >= 0xAC00 && (wc) <= 0xD7A3)
-#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA(wc) && !HANGUL(wc))
+#define EMOJI(wc) (_pango_Is_Emoji_Base_Character (wc))
+#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA (wc) && !HANGUL (wc) && !EMOJI (wc))
/* Previously "123foo" was two words. But in UAX 29 of Unicode,
* we know don't break words between consecutive letters and numbers
diff --git a/pango/pango-emoji-private.h b/pango/pango-emoji-private.h
index f0d3b7f9..928ad885 100644
--- a/pango/pango-emoji-private.h
+++ b/pango/pango-emoji-private.h
@@ -25,6 +25,9 @@
#include <glib.h>
gboolean
+_pango_Is_Emoji_Base_Character (gunichar ch);
+
+gboolean
_pango_Is_Emoji_Extended_Pictographic (gunichar ch);
typedef struct _PangoEmojiIter PangoEmojiIter;
diff --git a/pango/pango-emoji.c b/pango/pango-emoji.c
index c0e0de60..e316b370 100644
--- a/pango/pango-emoji.c
+++ b/pango/pango-emoji.c
@@ -95,6 +95,12 @@ DEFINE_pango_Is_(Emoji_Modifier_Base)
DEFINE_pango_Is_(Extended_Pictographic)
gboolean
+_pango_Is_Emoji_Base_Character (gunichar ch)
+{
+ return _pango_Is_Emoji (ch);
+}
+
+gboolean
_pango_Is_Emoji_Extended_Pictographic (gunichar ch)
{
return _pango_Is_Extended_Pictographic (ch);