Font cache is updated automatically in FcConfigAppFontAddDir.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19907
b3059339-0415-0410-9bf9-
f77b7e298cf2
if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
{
+ mp_msg(MSGT_GLOBAL, MSGL_INFO, "[ass] Updating font cache\n");
+ // FontConfig >= 2.4.0 updates cache automatically in FcConfigAppFontAddDir()
+ if (FcGetVersion() < 20400) {
FcFontSet* fcs;
FcStrSet* fss;
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "[ass] Updating font cache\n");
fcs = FcFontSetCreate();
fss = FcStrSetCreate();
rc = FcStrSetAdd(fss, (const FcChar8*)dir);
}
ErrorFontCache:
;
+ }
}
rc = FcConfigAppFontAddDir(priv->config, (const FcChar8*)dir);