]> granicus.if.org Git - libass/commitdiff
Only warn if both font family and it's full name are different from requested.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 1 May 2008 00:34:29 +0000 (00:34 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 1 May 2008 00:34:29 +0000 (00:34 +0000)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26624 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_fontconfig.c

index 48b24ad9792ce9b697dc230efadb3da4c6f8fdc6..610ab28dc2f23d9fb4b44335415ab09134cb42f9 100644 (file)
@@ -144,9 +144,12 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
        if (result != FcResultMatch)
                goto error;
 
-       if (strcasecmp((const char*)val_s, family) != 0)
-               mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne,
-                               (const char*)val_s, family);
+       if (strcasecmp((const char*)val_s, family) != 0) {
+               result = FcPatternGetString(rpat, FC_FULLNAME, 0, &val_s);
+               if (result != FcResultMatch || strcasecmp((const char*)val_s, family) != 0)
+                       mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne,
+                              (const char*)val_s, family);
+       }
 
        result = FcPatternGetString(rpat, FC_FILE, 0, &val_s);
        if (result != FcResultMatch)