# HG changeset patch # User eugeni # Date 1173173472 0 # Node ID 62127d7103692ab88540fe55387ba777c71dc3b5 # Parent 0f5455fc2d5dbd0150c8cfc41d06c6317a561008 Reset advance vector and glyph bounding box if glyph could not be found. diff -r 0f5455fc2d5d -r 62127d710369 libass/ass_render.c --- a/libass/ass_render.c Mon Mar 05 22:23:30 2007 +0000 +++ b/libass/ass_render.c Tue Mar 06 09:31:12 2007 +0000 @@ -1266,6 +1266,7 @@ 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 @@ // 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;