From 9a20a76b069281725836e959e8c2eba922d04733 Mon Sep 17 00:00:00 2001 From: eugeni Date: Fri, 2 May 2008 23:32:26 +0000 Subject: [PATCH] Move font family check to the end of the list. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26646 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libass/ass_fontconfig.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index 0b5fd6bde1..be784ff6c5 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -140,6 +140,11 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold goto error; *index = r_index; + result = FcPatternGetString(rpat, FC_FILE, 0, &r_file); + if (result != FcResultMatch) + goto error; + retval = strdup((const char*)r_file); + result = FcPatternGetString(rpat, FC_FAMILY, 0, &r_family); if (result != FcResultMatch) goto error; @@ -151,11 +156,6 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold (const char*)r_family, family); } - result = FcPatternGetString(rpat, FC_FILE, 0, &r_file); - if (result != FcResultMatch) - goto error; - - retval = strdup((const char*)r_file); error: if (pat) FcPatternDestroy(pat); if (fset) FcFontSetDestroy(fset);