changeset 22968:45c2d7b8c499

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.
author eugeni
date Fri, 13 Apr 2007 13:46:49 +0000
parents 25704c80d194
children c8ace3e97d73
files libass/ass_render.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_render.c	Fri Apr 13 13:31:54 2007 +0000
+++ b/libass/ass_render.c	Fri Apr 13 13:46:49 2007 +0000
@@ -1266,6 +1266,7 @@
 
 	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 @@
 		// 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;