summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-22 08:58:06 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-22 08:58:06 +0000
commit6ead8919a95c6f82ab50fd88ca0b4365df71e3b9 (patch)
treea7ad58776823327ea2f469e28aa072db904e3bed /libass
parent08678c2c6ab9b9b347a71d23d6e9fdf1b5511050 (diff)
downloadmpv-6ead8919a95c6f82ab50fd88ca0b4365df71e3b9.tar.bz2
mpv-6ead8919a95c6f82ab50fd88ca0b4365df71e3b9.tar.xz
Fix compilation with FontConfig <= 2.2.96.
It lacks FcPatternRemove function. The code will work fine, but produce an incorrect "Selected font is not the requested one" warning in rare cases. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26851 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_fontconfig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c
index b66dad7e60..34ffdb8519 100644
--- a/libass/ass_fontconfig.c
+++ b/libass/ass_fontconfig.c
@@ -150,11 +150,13 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
if (curf >= fset->nfont)
goto error;
+#if (FC_VERSION >= 20297)
// Remove all extra family names from original pattern.
// After this, FcFontRenderPrepare will select the most relevant family
// name in case there are more than one of them.
for (; family_cnt > 1; --family_cnt)
FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
+#endif
rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);
if (!rpat)