Cherry-pick Force-emoji-presentation.patch:

- Ensure that all emoji from the emoji chooser use emoji presentation
  instead of the black-and-white text presentation

LP: #1807719

Gbp-Dch: Full
This commit is contained in:
Jeremy Bicha
2018-12-10 09:57:19 -05:00
parent a8402cd1b3
commit 208ce309f6
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,41 @@
From: Matthias Clasen <mclasen@redhat.com>
Date: Tue, 27 Nov 2018 18:16:43 -0500
Subject: 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
(cherry picked from commit aac38198a3f5636c84033337c16df374f410b1e9
and commit b74e3209a5af03678ade12bfe6936171ff204b8c)
---
gtk/gtkemojichooser.c | 1 +
gtk/gtkemojicompletion.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index b2c161e..b423f80 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -392,6 +392,7 @@ add_emoji (GtkWidget *box,
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;
label = gtk_label_new (text);
diff --git a/gtk/gtkemojicompletion.c b/gtk/gtkemojicompletion.c
index 434047f..0a84400 100644
--- a/gtk/gtkemojicompletion.c
+++ b/gtk/gtkemojicompletion.c
@@ -474,6 +474,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;
}

View File

@ -6,3 +6,4 @@ wayland-Avoid-crashes-inside-wl_proxy_marshal.patch
060_ignore-random-icons.patch
reftest-known-fail.patch
Don-t-test-default-constructed-GdkPixbuf-properties.patch
Force-emoji-presentation.patch