[MPlayer-cvslog] r26851 - trunk/libass/ass_fontconfig.c
eugeni
subversion at mplayerhq.hu
Thu May 22 10:58:07 CEST 2008
Author: eugeni
Date: Thu May 22 10:58:06 2008
New Revision: 26851
Log:
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.
Modified:
trunk/libass/ass_fontconfig.c
Modified: trunk/libass/ass_fontconfig.c
==============================================================================
--- trunk/libass/ass_fontconfig.c (original)
+++ trunk/libass/ass_fontconfig.c Thu May 22 10:58:06 2008
@@ -150,11 +150,13 @@ static char* _select_font(fc_instance_t*
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)
More information about the MPlayer-cvslog
mailing list