summaryrefslogtreecommitdiff
path: root/pango/break.c
diff options
context:
space:
mode:
authorPeng Wu <pwu@redhat.com>2020-02-20 15:33:07 +0800
committerPeng Wu <pwu@redhat.com>2020-02-27 14:25:30 +0800
commit631775d8ee935a2faee322f2d28fb91fe6f9d3a8 (patch)
treedb5ed305949eae35540aa3ba3a8270c7dbc1654d /pango/break.c
parentcb599846ca8b0a7a70107932cc3b1c8abda606bd (diff)
downloadpango-631775d8ee935a2faee322f2d28fb91fe6f9d3a8.tar.gz
Update Grapheme and Word Boundary to Unicode 13
Diffstat (limited to 'pango/break.c')
-rw-r--r--pango/break.c19
1 files 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 */