summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Wu <pwu@redhat.com>2020-02-21 15:34:59 +0800
committerPeng Wu <pwu@redhat.com>2020-03-10 12:21:18 +0800
commit23b6d06e824bb892b5398786cf3da27f4400b293 (patch)
treec3259fd65a03073e15dcfd668175e44804228d0d
parent2ac57751b96ee6805aef06edf6aa87aeb85d9f63 (diff)
downloadpango-23b6d06e824bb892b5398786cf3da27f4400b293.tar.gz
Update Line Breaking to Unicode 13
-rw-r--r--pango/break.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/pango/break.c b/pango/break.c
index 00dc3db7..5aa9d41e 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1081,10 +1081,12 @@ pango_default_break (const gchar *text,
if ((prev_break_type == G_UNICODE_BREAK_ALPHABETIC ||
prev_break_type == G_UNICODE_BREAK_HEBREW_LETTER ||
prev_break_type == G_UNICODE_BREAK_NUMERIC) &&
- break_type == G_UNICODE_BREAK_OPEN_PUNCTUATION)
+ break_type == G_UNICODE_BREAK_OPEN_PUNCTUATION &&
+ !_pango_is_EastAsianWide (wc))
break_op = BREAK_PROHIBITED;
if (prev_break_type == G_UNICODE_BREAK_CLOSE_PARANTHESIS &&
+ !_pango_is_EastAsianWide (prev_wc)&&
(break_type == G_UNICODE_BREAK_ALPHABETIC ||
break_type == G_UNICODE_BREAK_HEBREW_LETTER ||
break_type == G_UNICODE_BREAK_NUMERIC))
@@ -1226,25 +1228,7 @@ pango_default_break (const gchar *text,
/* Rule LB22 */
if (break_type == G_UNICODE_BREAK_INSEPARABLE)
- {
- if (prev_break_type == G_UNICODE_BREAK_ALPHABETIC ||
- prev_break_type == G_UNICODE_BREAK_HEBREW_LETTER)
- break_op = BREAK_PROHIBITED;
-
- if (prev_break_type == G_UNICODE_BREAK_EXCLAMATION)
- break_op = BREAK_PROHIBITED;
-
- if (prev_break_type == G_UNICODE_BREAK_IDEOGRAPHIC ||
- prev_break_type == G_UNICODE_BREAK_EMOJI_BASE ||
- prev_break_type == G_UNICODE_BREAK_EMOJI_MODIFIER)
- break_op = BREAK_PROHIBITED;
-
- if (prev_break_type == G_UNICODE_BREAK_INSEPARABLE)
- break_op = BREAK_PROHIBITED;
-
- if (prev_break_type == G_UNICODE_BREAK_NUMERIC)
- break_op = BREAK_PROHIBITED;
- }
+ break_op = BREAK_PROHIBITED;
if (break_type == G_UNICODE_BREAK_AFTER ||
break_type == G_UNICODE_BREAK_HYPHEN ||