summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-01-21 06:31:45 +0100
committerGrigori Goronzy <greg@blackbox>2010-01-21 06:31:45 +0100
commit2ad2ebe573469b5c9c76e3c7826ff6106c5ba5a6 (patch)
tree5acdc5816a02670fdb6eb8e21783195576c00445
parent3f7a51356dd674c51787865bbcc091a815538794 (diff)
downloadlibass-2ad2ebe573469b5c9c76e3c7826ff6106c5ba5a6.tar.bz2
libass-2ad2ebe573469b5c9c76e3c7826ff6106c5ba5a6.tar.xz
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.
-rw-r--r--libass/ass_render.c5
1 files changed, 3 insertions, 2 deletions
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,