[pango] Don't change fonts for variation selectors



commit 5b4c0ee757f8da3de3abcfc92cb9684a60cad16a
Author: Behdad Esfahbod <behdad behdad org>
Date:   Mon May 22 21:00:40 2017 -0700

    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 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/pango/pango-context.c b/pango/pango-context.c
index f0cea73..f9551a0 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]