[pango/pango-1-44] Update Line Breaking to Unicode 13
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-44] Update Line Breaking to Unicode 13
- Date: Wed, 5 May 2021 16:00:29 +0000 (UTC)
commit 98b5cb1c808aee9e375ebb7454f98976e03677cc
Author: Peng Wu <pwu redhat com>
Date: Fri Feb 21 15:34:59 2020 +0800
Update Line Breaking to Unicode 13
(cherry-picked from commit 23b6d06e)
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]