summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-13 13:46:49 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-13 13:46:49 +0000
commit67061091c6294436df5e39f10baed3ae9f208b26 (patch)
treebd5b22a3bbab036b487e2dc0072826513df0a158 /libass/ass_render.c
parent2a921a1fd748ef28ef1e70059918d2068a097f0b (diff)
downloadmpv-67061091c6294436df5e39f10baed3ae9f208b26.tar.bz2
mpv-67061091c6294436df5e39f10baed3ae9f208b26.tar.xz
Fix a stupid bug in r22473: bbox is zero-filled everytime when a glyph
is found in the cache. This leads to broken karaoke (some glyphs are not highlighted at all), and, probably, slightly incorrect linebreaks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22986 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index a757c2d4da..8785726dbe 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1266,6 +1266,7 @@ static void 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->bbox.xMin = info->bbox.xMax = info->bbox.yMin = info->bbox.yMax = 0;
info->advance.x = info->advance.y = 0;
info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol);
@@ -1733,11 +1734,6 @@ 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;