Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > 70ef83d2f0ed0d4ace6b98fb4d42debe > files > 6

vdr-plugin-text2skin-1.1-0.20060904.11mdv2010.1.src.rpm

--- text2skin-1.0-orig/graphtft/font.c	2005-01-30 19:09:42.000000000 +0100
+++ text2skin/graphtft/font.c	2006-06-30 21:33:53.000000000 +0200
@@ -139,20 +139,21 @@
 		 error = FT_Load_Glyph( _face, glyph_index, FT_LOAD_DEFAULT ); 
 		 if ( error ) continue; /* ignore errors */  
 		 
-		 // convert to a mono bitmap
-		 error = FT_Render_Glyph( _face->glyph, ft_render_mode_mono ); 
-		 if ( error ) continue;
-		
 		// now, convert to vdr font data
 		int width = (_slot->metrics.horiAdvance / 64) + 1;
 		int bearingX = (_slot->metrics.horiBearingX / 64) +1;
 		width = (width > (int)sizeof(cFont::tPixelData) * 8) ? (((int)sizeof(cFont::tPixelData) * 8)-2) :width ;
-		int  top = _slot->bitmap_top;
-		int  y_off = Size - top;
 
 		font_data[(num_char_array*num_rows)+0]=width;
 		font_data[(num_char_array*num_rows)+1]=num_rows_global;
 
+		 // convert to a mono bitmap
+		 error = FT_Render_Glyph( _face->glyph, ft_render_mode_mono );
+		 if ( error ) continue;
+
+		int  top = _slot->bitmap_top;
+		int  y_off = Size - top;
+
 		unsigned char *bmp = _slot->bitmap.buffer;
 		
       		for (int y = 0; y < _slot->bitmap.rows; ++y , y_off++) {