From 5b4c0ee757f8da3de3abcfc92cb9684a60cad16a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 22 May 2017 21:00:40 -0700 Subject: Don't change fonts for variation selectors Fixes https://bugzilla.gnome.org/show_bug.cgi?id=781123 Patch from Takao Fujiwara. --- pango/pango-context.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pango/pango-context.c b/pango/pango-context.c index f0cea733..f9551a06 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1395,12 +1395,17 @@ itemize_state_process_run (ItemizeState *state) * characters if they don't, HarfBuzz will compatibility-decompose them * to ASCII space... * See bugs #355987 and #701652. + * + * We don't want to change fonts just for variation selectors. + * See bug #781123. */ type = g_unichar_type (wc); if (G_UNLIKELY (type == G_UNICODE_CONTROL || type == G_UNICODE_FORMAT || type == G_UNICODE_SURROGATE || - (type == G_UNICODE_SPACE_SEPARATOR && wc != 0x1680u /* OGHAM SPACE MARK */))) + (type == G_UNICODE_SPACE_SEPARATOR && wc != 0x1680u /* OGHAM SPACE MARK */) || + (wc >= 0xfe00u && wc <= 0xfe0fu) || + (wc >= 0xe0100u && wc <= 0xe01efu))) { shape_engine = NULL; font = NULL; -- cgit v1.2.1