[pango: 3/6] Update Line Breaking to Unicode 13
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango: 3/6] Update Line Breaking to Unicode 13
- Date: Mon, 8 Jun 2020 15:41:40 +0000 (UTC)
commit 23b6d06e824bb892b5398786cf3da27f4400b293
Author: Peng Wu <pwu redhat com>
Date: Fri Feb 21 15:34:59 2020 +0800
Update Line Breaking to Unicode 13
pango/break.c | 24 ++++--------------------
1 file 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 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]