diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-02 01:17:18 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-11 18:54:35 -0700 |
commit | 304f6f06ae3b2c40bf63d691a1b0169f10afd4e0 (patch) | |
tree | 42e75fd281caa556c391de7109532ba83801cb80 /pango | |
parent | 78172a9d50f5cec869c0d23742d6d52219ae8042 (diff) | |
download | pango-304f6f06ae3b2c40bf63d691a1b0169f10afd4e0.tar.gz |
itemize: Fix up gravity state initialization
itemize_state_init was setting gravity-related fields
to their initial values too late, after update_attr_iterator
has already set them to the values for the first run.
Test included.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-context.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c index ac59f3d8..4f15dd61 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1031,6 +1031,11 @@ itemize_state_init (ItemizeState *state, state->embedding_end = text + start_index; update_embedding_end (state); + state->gravity = PANGO_GRAVITY_AUTO; + state->centered_baseline = PANGO_GRAVITY_IS_VERTICAL (state->context->resolved_gravity); + state->gravity_hint = state->context->gravity_hint; + state->resolved_gravity = PANGO_GRAVITY_AUTO; + /* Initialize the attribute iterator */ if (cached_iter) @@ -1088,10 +1093,6 @@ itemize_state_init (ItemizeState *state, else state->font_desc_gravity = PANGO_GRAVITY_AUTO; - state->gravity = PANGO_GRAVITY_AUTO; - state->centered_baseline = PANGO_GRAVITY_IS_VERTICAL (state->context->resolved_gravity); - state->gravity_hint = state->context->gravity_hint; - state->resolved_gravity = PANGO_GRAVITY_AUTO; state->derived_lang = NULL; state->current_fonts = NULL; state->cache = NULL; |