From: Grigori Goronzy Date: Sun, 23 Aug 2009 14:41:36 +0000 (+0200) Subject: Fix order of pen advance assignments X-Git-Tag: 0.9.8~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2441b10de97b3d52c7d2d2f5f0c92d648e41585d;p=libass Fix order of pen advance assignments --- diff --git a/libass/ass_render.c b/libass/ass_render.c index b6ec7e4..b595881 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -2737,6 +2737,9 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event, get_outline_glyph(render_priv, code, text_info->glyphs + text_info->length, drawing); + text_info->glyphs[text_info->length].pos.x = pen.x; + text_info->glyphs[text_info->length].pos.y = pen.y; + // Add additional space after italic to non-italic style changes if (text_info->length && text_info->glyphs[text_info->length - 1].hash_key.italic && @@ -2748,9 +2751,6 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event, pen.x += FFMAX(0, og->bbox.xMax - og->advance.x); } - text_info->glyphs[text_info->length].pos.x = pen.x; - text_info->glyphs[text_info->length].pos.y = pen.y; - pen.x += text_info->glyphs[text_info->length].advance.x; pen.x += double_to_d6(render_priv->state.hspacing * render_priv->font_scale