diff options
author | 2008-05-02 23:32:26 +0000 | |
---|---|---|
committer | 2008-05-02 23:32:26 +0000 | |
commit | 9a20a76b069281725836e959e8c2eba922d04733 (patch) | |
tree | 66267cac55bf439ea6f108cf1cb0a0250407abca | |
parent | 97972596e823f7ffec322f1a9a4e87e8433ecaa0 (diff) |
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
-rw-r--r-- | libass/ass_fontconfig.c | 10 |
1 files 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); |