# HG changeset patch # User eugeni # Date 1211446686 0 # Node ID d288ec15f2cca6b69a3609af240e8fba4c7d527a # Parent 089ac698f8b1155d9dabf379afe6a36751cbad44 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. diff -r 089ac698f8b1 -r d288ec15f2cc libass/ass_fontconfig.c --- a/libass/ass_fontconfig.c Wed May 21 20:46:05 2008 +0000 +++ b/libass/ass_fontconfig.c Thu May 22 08:58:06 2008 +0000 @@ -150,11 +150,13 @@ 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)