diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-06 09:31:12 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-06 09:31:12 +0000 |
commit | 3a14d1c37aa86fd08aec2b622bb76adfd1356310 (patch) | |
tree | e9eb74a3a839dd9a15807afe5835e49356f73cc8 /libass/ass_render.c | |
parent | f6687e7a78e47ad9814a73dc499ae16536371b23 (diff) | |
download | mpv-3a14d1c37aa86fd08aec2b622bb76adfd1356310.tar.bz2 mpv-3a14d1c37aa86fd08aec2b622bb76adfd1356310.tar.xz |
Reset advance vector and glyph bounding box if glyph could not be found.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22473 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r-- | libass/ass_render.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index f89bf4d564..6f60a3245c 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1266,6 +1266,7 @@ static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance) info->outline_glyph = 0; info->bm = info->bm_o = info->bm_s = 0; + info->advance.x = info->advance.y = 0; info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol); if (!info->glyph) @@ -1734,6 +1735,11 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images) // if it's an outline glyph, we still need to fill the bbox if (text_info.glyphs[text_info.length].glyph) { FT_Glyph_Get_CBox( text_info.glyphs[text_info.length].glyph, FT_GLYPH_BBOX_PIXELS, &(text_info.glyphs[text_info.length].bbox) ); + } else { + text_info.glyphs[text_info.length].bbox.xMin = 0; + text_info.glyphs[text_info.length].bbox.yMin = 0; + text_info.glyphs[text_info.length].bbox.xMax = 0; + text_info.glyphs[text_info.length].bbox.yMax = 0; } previous = code; |