diff options
author | Grigori Goronzy <greg@blackbox> | 2009-08-19 23:10:24 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-08-20 04:41:07 +0200 |
commit | c4e5b08cc0a321da7cd9261bb887a003f0fb2693 (patch) | |
tree | db82392ee158f2517461f88bba14d390ac5df2f8 | |
parent | aff07368a515c24f77ac768ffd54be81265df3ff (diff) | |
download | libass-c4e5b08cc0a321da7cd9261bb887a003f0fb2693.tar.bz2 libass-c4e5b08cc0a321da7cd9261bb887a003f0fb2693.tar.xz |
VSFilter quirk: double-scale widths of opaque boxes
VSFilter double-scales the widths of the opaque box in X direction,
which gives much wider boxes than expected (or much less wider boxes)
if ScaleX != 100. Emulate this behavior, even if it is unbelievably
stupid and no doubt a bug in VSFilter.
-rw-r--r-- | libass/ass_render.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 15f568d..0b66e56 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1907,6 +1907,11 @@ static void draw_opaque_box(ASS_Renderer *render_priv, uint32_t ch, asc *= scale_y; desc *= scale_y; + // Emulate the WTFish behavior of VSFilter, i.e. double-scale + // the widths of the opaque box. + adv *= render_priv->state.scale_x * render_priv->font_scale_x; + sx *= render_priv->state.scale_x * render_priv->font_scale_x; + FT_Vector points[4] = { { .x = -sx, .y = asc + sy }, { .x = adv + sx, .y = asc + sy }, |