diff options
author | wm4 <wm4@nowhere> | 2012-09-29 22:12:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-29 22:12:17 +0200 |
commit | 758b15ecd437137bb9e794884fa8483430a0fee6 (patch) | |
tree | 1b3e2d5ab2e73c1f40e7c63323c870f1f495cef6 | |
parent | 7af78014635dbe81c3328405aa68dd2cfef94bc4 (diff) | |
download | libass-758b15ecd437137bb9e794884fa8483430a0fee6.tar.bz2 libass-758b15ecd437137bb9e794884fa8483430a0fee6.tar.xz |
Fix \fay when used with multiline subs
When \fay tag is applied to a multiline sub, it causes subsequent lines
of the sub to be offset vertically as if it was rendered next to the
previous line (not below).
Patch by Hector Martin <hector@marcansoft.com>, with an additional
correction related to libass issue #46.
-rw-r--r-- | libass/ass_render.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 7be12fa..c7ebef5 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1942,6 +1942,7 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event, for (i = 0; i < text_info->length; i++) { GlyphInfo *info = glyphs + cmap[i]; if (glyphs[i].linebreak) { + pen.y -= (info->fay / info->scale_x * info->scale_y) * pen.x; pen.x = 0; pen.y += double_to_d6(text_info->lines[lineno-1].desc); pen.y += double_to_d6(text_info->lines[lineno].asc); |