]> granicus.if.org Git - libass/commitdiff
VSFilter compat: don't render shadow when glyph/border invisible
authorGrigori Goronzy <greg@blackbox>
Fri, 8 Apr 2011 22:24:48 +0000 (00:24 +0200)
committerGrigori Goronzy <greg@blackbox>
Fri, 8 Apr 2011 22:24:48 +0000 (00:24 +0200)
Yet another VSFilter idiosyncracy: when the glyph fill is invisible
(alpha 0xFF) and there is no border, do not render any shadow.

libass/ass_render.c

index 8ca69117cb0ff51da7e25a3477cfdd36f15d8f8b..2f3405e67cdcbe4f57b6e7b5b59dec59c7003fe2 100644 (file)
@@ -1302,6 +1302,11 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info)
             FT_Done_Glyph(outline);
         }
     }
+
+    // VSFilter compatibility: invisible fill and no border?
+    // In this case no shadow is supposed to be rendered.
+    if (!info->outline_glyph && (info->c[0] >> 24) == 0xFF)
+        info->bm_s = 0;
 }
 
 /**