mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
97972596e8
commit
9a20a76b06
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue