[pango/matthiasc/for-main] Don't replace | with hyphens
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/matthiasc/for-main] Don't replace | with hyphens
- Date: Sat, 20 Nov 2021 00:31:51 +0000 (UTC)
commit b3cc93010062b11c139cff2ebb7c64d43b7b872f
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 19 17:15:21 2021 -0500
Don't replace | with hyphens
I went a bit overboard in #603. The vertical bar
is too common, and this usage to specialized to
do it by default. To enable this, we should rather
make log attrs tweakable.
We still replace hyphenation points with hyphens.
Fixes: #630
pango/break.c | 3 +--
tests/breaks/sixteen.expected | 2 +-
tests/layouts/valid-17.expected | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index 3a3e0b23..3af083ce 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1624,8 +1624,7 @@ default_break (const char *text,
else
attrs[i].break_inserts_hyphen = insert_hyphens;
- if (prev_wc == 0x007C || /* Vertical Line */
- prev_wc == 0x2027) /* Hyphenation point */
+ if (prev_wc == 0x2027) /* Hyphenation point */
{
attrs[i].break_inserts_hyphen = TRUE;
attrs[i].break_removes_preceding = TRUE;
diff --git a/tests/breaks/sixteen.expected b/tests/breaks/sixteen.expected
index 221358e7..0fd06fb2 100644
--- a/tests/breaks/sixteen.expected
+++ b/tests/breaks/sixteen.expected
@@ -4,4 +4,4 @@ Whitespace: x w
Sentences: bs e b
Words: bs e s be bs be bs be b
Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b
-Hyphens: i ri i i i ri i i i i i i i i i i i
+Hyphens: i ri i i i i i i i i i i i i i i
diff --git a/tests/layouts/valid-17.expected b/tests/layouts/valid-17.expected
index a2b7d494..4b3192fb 100644
--- a/tests/layouts/valid-17.expected
+++ b/tests/layouts/valid-17.expected
@@ -28,7 +28,7 @@ i=3, index=17, paragraph-start=1, dir=ltr ''
--- runs
-i=1, index=0, chars=13, level=0, gravity=south, flags=4, font=OMITTED, script=latin, language=en-us,
'some|bla|bla|'
+i=1, index=0, chars=13, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us,
'some|bla|bla|'
i=2, index=13, no run, line end
i=3, index=13, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'bla'
i=4, index=16, no run, line end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]