summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-12-25 16:02:34 +0100
committerBehdad Esfahbod <behdad@behdad.org>2009-12-25 19:22:19 +0100
commitd52aa9ec30e74b593eee80082bf8f27bea08246f (patch)
treebac430bc66083d3b8991fc33307e040f9ca839e8 /pango
parent2cd9c4b416cbe55dd68106003f360e861a6722be (diff)
downloadpango-d52aa9ec30e74b593eee80082bf8f27bea08246f.tar.gz
Always recalculate run width after breaking the run
Before we only did this if justifying. However, computing the width is essentially free these days, so do it always.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-layout.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index df8207c3..f78fbb49 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3352,17 +3352,11 @@ process_item (PangoLayout *layout,
length = g_utf8_offset_to_pointer (layout->text + item->offset, break_num_chars) - (layout->text + item->offset);
new_item = pango_item_split (item, length, break_num_chars);
-
- /* reshaping may slightly change the item width. update
- * remaining_width if we are justifying */
+ /* Add the width back, to the line, reshape, subtract the new width */
state->remaining_width += break_width;
-
insert_run (line, state, new_item, FALSE);
-
- if (layout->justify)
- break_width = pango_glyph_string_get_width (((PangoGlyphItem *)(line->runs->data))->glyphs);
-
+ break_width = pango_glyph_string_get_width (((PangoGlyphItem *)(line->runs->data))->glyphs);
state->remaining_width -= break_width;
state->log_widths_offset += break_num_chars;