]> granicus.if.org Git - libass/commitdiff
Do not draw opaque box if border size zero
authorGrigori Goronzy <greg@blackbox>
Wed, 12 Aug 2009 04:42:48 +0000 (06:42 +0200)
committerGrigori Goronzy <greg@blackbox>
Wed, 12 Aug 2009 04:43:52 +0000 (06:43 +0200)
This follows VSFilter's behavior.

libass/ass_render.c

index 90df1b56e9c96a85836e8f5bf0a3fa8b5ac79e13..b9125b8720e2ac729ccad150e272de0a1ef35df0 100644 (file)
@@ -2035,7 +2035,9 @@ get_outline_glyph(ASS_Renderer *render_priv, int symbol,
         info->advance.y = d16_to_d6(info->glyph->advance.y);
         FT_Glyph_Get_CBox(info->glyph, FT_GLYPH_BBOX_SUBPIXELS, &info->bbox);
 
-        if (render_priv->state.style->BorderStyle == 3) {
+        if (render_priv->state.style->BorderStyle == 3 &&
+            (render_priv->state.border_x > 0||
+             render_priv->state.border_y > 0)) {
             FT_Glyph_Copy(info->glyph, &info->outline_glyph);
             draw_opaque_box(render_priv, symbol, info->outline_glyph,
                             double_to_d6(render_priv->state.border_x *