summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-03 23:41:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-03 23:55:09 -0400
commit90777d89aa15fb2be260dc442d5cf4ce5a15234d (patch)
tree5cd902dae8f3e1140868b34a0d1b3f0d1a707664 /pango/pango-context.c
parente2c1cdbec788875fe02d63d801ba022ee6d75db5 (diff)
downloadpango-90777d89aa15fb2be260dc442d5cf4ce5a15234d.tar.gz
itemize: Ignore width in horizontal contextignore-width-in-horizontal2
Changes in width only need to break runs in vertical context. Update tests and add a new test. Fixes: #503
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 4f15dd61..2cb3304c 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1083,6 +1083,9 @@ itemize_state_init (ItemizeState *state,
width_iter_init (&state->width_iter, text + start_index, length);
_pango_emoji_iter_init (&state->emoji_iter, text + start_index, length);
+ if (!PANGO_GRAVITY_IS_VERTICAL (state->context->resolved_gravity))
+ state->width_iter.end = state->end;
+ else
if (state->emoji_iter.is_emoji)
state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end);