diff options
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r-- | pango/pango-layout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 4360e973..1e8f1087 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -4039,8 +4039,11 @@ retry_break: new_break_width = pango_glyph_string_get_width (glyphs); - if (new_item->analysis.flags & PANGO_ANALYSIS_FLAG_NEED_HYPHEN) - new_break_width -= extra_width; + if (num_chars > 0 && + layout->log_attrs[state->start_offset + num_chars - 1].is_white) + extra_width = - state->log_widths[state->log_widths_offset + num_chars - 1]; + else + extra_width = 0; g_debug ("measured breakpoint %d: %d", num_chars, new_break_width); |