# HG changeset patch # User eugeni # Date 1158671204 0 # Node ID 27b87a9dc19af869e5c5d03f96c80ee9652e94b1 # Parent eccf441ab9ffc2b93c92eec0cfc7e8925a69f4b3 Don't call FcDirScan/FcDirSave with FontConfig >= 2.4. Font cache is updated automatically in FcConfigAppFontAddDir. diff -r eccf441ab9ff -r 27b87a9dc19a libass/ass_fontconfig.c --- a/libass/ass_fontconfig.c Tue Sep 19 07:17:10 2006 +0000 +++ b/libass/ass_fontconfig.c Tue Sep 19 13:06:44 2006 +0000 @@ -154,9 +154,11 @@ 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); @@ -178,6 +180,7 @@ } ErrorFontCache: ; + } } rc = FcConfigAppFontAddDir(priv->config, (const FcChar8*)dir);