]> granicus.if.org Git - libass/commitdiff
Correct vertical glyph positioning for \fay
authorGrigori Goronzy <greg@blackbox>
Wed, 24 Jun 2009 21:48:05 +0000 (23:48 +0200)
committerGrigori Goronzy <greg@blackbox>
Wed, 24 Jun 2009 21:48:05 +0000 (23:48 +0200)
Offset the next glyph by the total shear of the glyph before.
This is done before line-wrapping, so that a line that is vertically
sheared will get as much higher, as it is sheared. Fine by me, but
vsfilter probably does it in a different way.

libass/ass_render.c

index 385821e5afc43d5e0e8281e8798d6d4f85ef2c6a..b405e18b386a92ea869921177c4f9144542b3eaf 100644 (file)
@@ -2285,6 +2285,8 @@ ass_render_event(ass_renderer_t *render_priv, ass_event_t *event,
         pen.x += text_info->glyphs[text_info->length].advance.x;
         pen.x += double_to_d6(render_priv->state.hspacing);
         pen.y += text_info->glyphs[text_info->length].advance.y;
+        pen.y += render_priv->state.fay *
+                 text_info->glyphs[text_info->length].advance.x;
 
         previous = code;