From 7a4e9fa4d38eb917ce9eddfe5ae6b7cd87dd48c7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 27 Nov 2018 18:16:43 -0500 Subject: [PATCH] Force emoji presentation Append a variation selector to the Emoji sequences, to force Emoji presentation. Without this, some Emoji come out with text presentation by default. Closes: Pango #334 --- gtk/gtkemojichooser.c | 1 + gtk/gtkemojicompletion.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c index a829884fcc..d8124cb90f 100644 --- a/gtk/gtkemojichooser.c +++ b/gtk/gtkemojichooser.c @@ -361,6 +361,7 @@ add_emoji (GtkWidget *box, p += g_unichar_to_utf8 (code, p); } g_variant_unref (codes); + p += g_unichar_to_utf8 (0xFE0E, p); /* U+FE0F is the Emoji variation selector */ p[0] = 0; label = gtk_label_new (text); diff --git a/gtk/gtkemojicompletion.c b/gtk/gtkemojicompletion.c index e7583126d9..058e1867e2 100644 --- a/gtk/gtkemojicompletion.c +++ b/gtk/gtkemojicompletion.c @@ -452,6 +452,7 @@ get_text (GVariant *emoji_data, p += g_unichar_to_utf8 (code, p); } g_variant_unref (codes); + p += g_unichar_to_utf8 (0xFE0F, p); /* U+FE0F is the Emoji variation selector */ p[0] = 0; }