diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-05-08 15:09:45 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-05-08 20:24:49 -0400 |
commit | d476d2a944500f8553a2c1d1054df37363f47460 (patch) | |
tree | 939c02f905665d7eb2ac8f2460d938c5826e1100 /pango | |
parent | 62ede003a14b03311885ee873725b8caa5f9ce53 (diff) | |
download | pango-d476d2a944500f8553a2c1d1054df37363f47460.tar.gz |
layout: Don't insert hyphens at word boundariesword-break-hyphens
We only want to insert hyphens when we are breaking
inside a word.
Update affected tests (hyphen-or-not shows up in the
analysis flags in the output of test-layout).
Fixes: #558
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index fa499ef3..e847e789 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -3611,6 +3611,9 @@ break_needs_hyphen (PangoLayout *layout, if (state->log_widths_offset + pos == 0) return FALSE; + if (layout->log_attrs[state->start_offset + pos].is_line_break) + return FALSE; + if (state->need_hyphen[state->log_widths_offset + pos - 1]) return TRUE; |