[pango/pango2: 65/201] break: Cosmetics
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 65/201] break: Cosmetics
- Date: Sat, 11 Jun 2022 02:22:28 +0000 (UTC)
commit 97ac0f74b97c5a3e1635e94b4bb6a0e35d1de849
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jan 14 20:22:37 2022 -0500
break: Cosmetics
Just rearrange the hyphen code slightly.
pango/break.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index ce701496..58e3702c 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1600,11 +1600,6 @@ default_break (const char *text,
space_or_hyphen = TRUE;
break;
default:
- break;
- }
-
- if (!space_or_hyphen)
- {
if (wc == '-' || /* Hyphen-minus */
wc == 0x058a || /* Armenian hyphen */
wc == 0x1400 || /* Canadian syllabics hyphen */
@@ -1616,9 +1611,15 @@ default_break (const char *text,
wc == 0xfe63 || /* Small hyphen-minus */
wc == 0xff0d) /* Fullwidth hyphen-minus */
space_or_hyphen = TRUE;
+ break;
}
- if (attrs[i].is_word_boundary)
+ if (prev_wc == 0x2027) /* Hyphenation point */
+ {
+ attrs[i].break_inserts_hyphen = TRUE;
+ attrs[i].break_removes_preceding = TRUE;
+ }
+ else if (attrs[i].is_word_boundary)
attrs[i].break_inserts_hyphen = FALSE;
else if (prev_space_or_hyphen)
attrs[i].break_inserts_hyphen = FALSE;
@@ -1627,12 +1628,6 @@ default_break (const char *text,
else
attrs[i].break_inserts_hyphen = insert_hyphens;
- if (prev_wc == 0x2027) /* Hyphenation point */
- {
- attrs[i].break_inserts_hyphen = TRUE;
- attrs[i].break_removes_preceding = TRUE;
- }
-
prev_space_or_hyphen = space_or_hyphen;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]