From 19c9e0aceb9620c862cab91b509df91931821d66 Mon Sep 17 00:00:00 2001 From: eugeni Date: Thu, 1 May 2008 00:34:29 +0000 Subject: Only warn if both font family and it's full name are different from requested. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26624 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libass/ass_fontconfig.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libass') diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index 48b24ad979..610ab28dc2 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -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) -- cgit v1.2.3