diff options
author | Alexander Larsson <alexl@redhat.com> | 2002-10-23 08:47:56 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2002-10-23 08:47:56 +0000 |
commit | 845f847aaa87836bde977ada033f44c281d03a25 (patch) | |
tree | ad80fdf1284f7c801cf66b8b903795797f63d084 | |
parent | efe38161780103a7f01e1f241eca4d02e2039326 (diff) | |
download | pango-845f847aaa87836bde977ada033f44c281d03a25.tar.gz |
Don't break at the first char in the first item on a line. Fixes
2002-10-23 Alexander Larsson <alexl@redhat.com>
* pango/pango-layout.c (can_break_in):
Don't break at the first char in the first item on a line.
Fixes regression in linebreaking (#95900).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 6 | ||||
-rw-r--r-- | pango/pango-layout.c | 9 |
7 files changed, 42 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2002-10-23 Alexander Larsson <alexl@redhat.com> + + * pango/pango-layout.c (can_break_in): + Don't break at the first char in the first item on a line. + Fixes regression in linebreaking (#95900). + 2002-10-22 Tor Lillqvist <tml@iki.fi> * configure.in: Add --with-usp10 flag to indicate where to find diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index a9b0644b..bedfc5c8 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +2002-10-23 Alexander Larsson <alexl@redhat.com> + + * pango/pango-layout.c (can_break_in): + Don't break at the first char in the first item on a line. + Fixes regression in linebreaking (#95900). + 2002-10-22 Tor Lillqvist <tml@iki.fi> * configure.in: Add --with-usp10 flag to indicate where to find diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index a9b0644b..bedfc5c8 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +2002-10-23 Alexander Larsson <alexl@redhat.com> + + * pango/pango-layout.c (can_break_in): + Don't break at the first char in the first item on a line. + Fixes regression in linebreaking (#95900). + 2002-10-22 Tor Lillqvist <tml@iki.fi> * configure.in: Add --with-usp10 flag to indicate where to find diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index a9b0644b..bedfc5c8 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +2002-10-23 Alexander Larsson <alexl@redhat.com> + + * pango/pango-layout.c (can_break_in): + Don't break at the first char in the first item on a line. + Fixes regression in linebreaking (#95900). + 2002-10-22 Tor Lillqvist <tml@iki.fi> * configure.in: Add --with-usp10 flag to indicate where to find diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index a9b0644b..bedfc5c8 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +2002-10-23 Alexander Larsson <alexl@redhat.com> + + * pango/pango-layout.c (can_break_in): + Don't break at the first char in the first item on a line. + Fixes regression in linebreaking (#95900). + 2002-10-22 Tor Lillqvist <tml@iki.fi> * configure.in: Add --with-usp10 flag to indicate where to find diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index a9b0644b..bedfc5c8 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +2002-10-23 Alexander Larsson <alexl@redhat.com> + + * pango/pango-layout.c (can_break_in): + Don't break at the first char in the first item on a line. + Fixes regression in linebreaking (#95900). + 2002-10-22 Tor Lillqvist <tml@iki.fi> * configure.in: Add --with-usp10 flag to indicate where to find diff --git a/pango/pango-layout.c b/pango/pango-layout.c index d49e5f64..aec4ed70 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -2447,11 +2447,12 @@ can_break_at (PangoLayout *layout, static inline gboolean can_break_in (PangoLayout *layout, int start_offset, - int num_chars) + int num_chars, + gboolean allow_break_at_start) { int i; - for (i = 0; i < num_chars; i++) + for (i = allow_break_at_start ? 0 : 1; i < num_chars; i++) if (can_break_at (layout, start_offset + i, FALSE)) return TRUE; @@ -2720,16 +2721,18 @@ process_line (PangoLayout *layout, BreakResult result; int old_num_chars; int old_remaining_width; + gboolean first_item_in_line; old_num_chars = item->num_chars; old_remaining_width = state->remaining_width; + first_item_in_line = line->runs != NULL; result = process_item (layout, line, state, !have_break, FALSE); switch (result) { case BREAK_ALL_FIT: - if (can_break_in (layout, state->start_offset, old_num_chars)) + if (can_break_in (layout, state->start_offset, old_num_chars, first_item_in_line)) { have_break = TRUE; break_remaining_width = old_remaining_width; |