]> granicus.if.org Git - libass/commitdiff
Fix order of pen advance assignments
authorGrigori Goronzy <greg@blackbox>
Sun, 23 Aug 2009 14:41:36 +0000 (16:41 +0200)
committerGrigori Goronzy <greg@blackbox>
Sun, 23 Aug 2009 14:41:36 +0000 (16:41 +0200)
libass/ass_render.c

index b6ec7e4b0253461cd161b7f08074df6e29a7b3e3..b5958814288496a95979d5ede36d998fc25300cb 100644 (file)
@@ -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