[pango/pango-1-44] Update Grapheme and Word Boundary to Unicode 13



commit 091dbd46fb1301ed7bb40dab9085481a3395d670
Author: Peng Wu <pwu redhat com>
Date:   Thu Feb 20 15:33:07 2020 +0800

    Update Grapheme and Word Boundary to Unicode 13
    
    (cherry-picked from commit 631775d8)

 pango/break.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index ca62a28f..00dc3db7 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -398,9 +398,8 @@ pango_default_break (const gchar   *text,
                             wc == 0x6DD ||
                             wc == 0x70F ||
                             wc == 0x8E2 ||
-                            wc == 0xD4E ||
                             wc == 0x110BD ||
-                            (wc >= 0x111C2 && wc <= 0x111C3)))
+                            wc == 0x110CD))
               {
                 GB_type = GB_Prepend;
                 break;
@@ -426,6 +425,10 @@ pango_default_break (const gchar   *text,
          case G_UNICODE_OTHER_LETTER:
            if (makes_hangul_syllable)
              GB_type = GB_InHangulSyllable;
+
+           if (_pango_is_Consonant_Preceding_Repha (wc) ||
+               _pango_is_Consonant_Prefixed (wc))
+             GB_type = GB_Prepend;
            break;
 
          case G_UNICODE_MODIFIER_LETTER:
@@ -570,7 +573,7 @@ pango_default_break (const gchar   *text,
                    WB_type = WB_ExtendFormat; /* Other_Grapheme_Extend */
                  break;
                case 0x05:
-                 if (wc == 0x05F3)
+                 if (wc == 0x058A)
                    WB_type = WB_ALetter; /* ALetter exceptions */
                  break;
                }
@@ -617,12 +620,16 @@ pango_default_break (const gchar   *text,
                    WB_type = WB_MidNumLet; /* MidNumLet */
                  break;
                case G_UNICODE_OTHER_PUNCTUATION:
-                 if (wc == 0x0027 || wc == 0x002e || wc == 0x2024 ||
+                 if ((wc >= 0x055a && wc <= 0x055c) ||
+                     wc == 0x055e || wc == 0x05f3)
+                   WB_type = WB_ALetter; /* ALetter */
+                 else if (wc == 0x0027 || wc == 0x002e || wc == 0x2024 ||
                      wc == 0xfe52 || wc == 0xff07 || wc == 0xff0e)
                    WB_type = WB_MidNumLet; /* MidNumLet */
-                 else if (wc == 0x00b7 || wc == 0x05f4 || wc == 0x2027 || wc == 0x003a || wc == 0x0387 ||
+                 else if (wc == 0x00b7 || wc == 0x05f4 || wc == 0x2027 ||
+                          wc == 0x003a || wc == 0x0387 || wc == 0x055f ||
                           wc == 0xfe13 || wc == 0xfe55 || wc == 0xff1a)
-                   WB_type = WB_MidLetter; /* WB_MidLetter */
+                   WB_type = WB_MidLetter; /* MidLetter */
                  else if (wc == 0x066c ||
                           wc == 0xfe50 || wc == 0xfe54 || wc == 0xff0c || wc == 0xff1b)
                    WB_type = WB_MidNum; /* MidNum */


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