[MPlayer-cvslog] r26856 - trunk/libass/ass_fontconfig.c

eugeni subversion at mplayerhq.hu
Fri May 23 00:52:57 CEST 2008


Author: eugeni
Date: Fri May 23 00:52:57 2008
New Revision: 26856

Log:
Read all faces of a memory font, not just the first one.


Modified:
   trunk/libass/ass_fontconfig.c

Modified: trunk/libass/ass_fontconfig.c
==============================================================================
--- trunk/libass/ass_fontconfig.c	(original)
+++ trunk/libass/ass_fontconfig.c	Fri May 23 00:52:57 2008
@@ -351,12 +351,15 @@ static void process_fontdata(fc_instance
 	FcPattern* pattern;
 	FcFontSet* fset;
 	FcBool res;
+	int face_index, num_faces = 1;
 
-	rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
+	for (face_index = 0; face_index < num_faces; ++face_index) {
+	rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, face_index, &face);
 	if (rc) {
 		mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorOpeningMemoryFont, name);
 		return;
 	}
+	num_faces = face->num_faces;
 
 	pattern = FcFreeTypeQueryFace(face, (unsigned char*)name, 0, FcConfigGetBlanks(priv->config));
 	if (!pattern) {
@@ -380,6 +383,7 @@ static void process_fontdata(fc_instance
 	}
 
 	FT_Done_Face(face);
+	}
 #endif
 }
 



More information about the MPlayer-cvslog mailing list