changeset 23023:0694bbf7ac84

Because of the outline glyph cache it is now possible for glyph_info_t to have both non-zero glyph and bitmap at the same time. In that case, bitmap should not be generated anew.
author eugeni
date Fri, 20 Apr 2007 23:11:39 +0000
parents 199a3c6f54e8
children a66b42eda8e8
files libass/ass_render.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_render.c	Fri Apr 20 23:10:33 2007 +0000
+++ b/libass/ass_render.c	Fri Apr 20 23:11:39 2007 +0000
@@ -393,7 +393,7 @@
 	ass_image_t** tail = &head;
 
 	for (i = 0; i < text_info->length; ++i) {
-		if (text_info->glyphs[i].glyph) {
+		if (text_info->glyphs[i].glyph && text_info->glyphs[i].bm == 0) {
 			if ((text_info->glyphs[i].symbol == '\n') || (text_info->glyphs[i].symbol == 0))
 				continue;
 			error = glyph_to_bitmap(ass_renderer->synth_priv,
@@ -1950,11 +1950,13 @@
 			FT_Vector shift;
 			glyph_info_t* info = text_info.glyphs + i;
 
+			if (info->bm == 0) {
 			// calculating shift vector
 			shift.x = int_to_d6(info->pos.x + device_x - center.x);
 			shift.y = - int_to_d6(info->pos.y + device_y - center.y);
 
 			transform_3d(shift, &info->glyph, &info->outline_glyph, info->frx, info->fry, info->frz);
+			}
 		}
 	}