# HG changeset patch # User eugeni # Date 1211496777 0 # Node ID 6112b693fab94a8f16082a5742e0a05a503456f2 # Parent a9aae3d4721dae27340b1d1b0ab54d76a9aa7bb8 Read all faces of a memory font, not just the first one. diff -r a9aae3d4721d -r 6112b693fab9 libass/ass_fontconfig.c --- a/libass/ass_fontconfig.c Thu May 22 20:21:19 2008 +0000 +++ b/libass/ass_fontconfig.c Thu May 22 22:52:57 2008 +0000 @@ -351,12 +351,15 @@ 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 @@ } FT_Done_Face(face); + } #endif }