From: Grigori Goronzy Date: Thu, 21 Jan 2010 05:31:45 +0000 (+0100) Subject: Skip border generation if glyph is collapsed X-Git-Tag: 0.9.9~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ad2ebe573469b5c9c76e3c7826ff6106c5ba5a6;p=libass Skip border generation if glyph is collapsed If a character is completely collapsed in x or y direction (\fscx0, \fscy0), the rasterizer will not generate any visible pixels. This also means vsfilter will never draw any border in this case, since it works on the pixel data. FreeType's stroker OTOH happily draws a border around a character, no matter how collapsed it is. Emulate vsfilter's behavior by skipping border generation if the glyph is collapsed. --- diff --git a/libass/ass_render.c b/libass/ass_render.c index 6e4fb7a..dda0184 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1158,8 +1158,9 @@ get_outline_glyph(ASS_Renderer *render_priv, int symbol, GlyphInfo *info, render_priv->border_scale), double_to_d6(render_priv->state.border_y * render_priv->border_scale)); - } else if (render_priv->state.border_x > 0 || - render_priv->state.border_y > 0) { + } else if ((render_priv->state.border_x > 0 + || render_priv->state.border_y > 0) + && key.scale_x && key.scale_y) { FT_Glyph_Copy(info->glyph, &info->outline_glyph); stroke_outline_glyph(render_priv,