Mercurial > mplayer.hg
changeset 19901:27b87a9dc19a
Don't call FcDirScan/FcDirSave with FontConfig >= 2.4.
Font cache is updated automatically in FcConfigAppFontAddDir.
author | eugeni |
---|---|
date | Tue, 19 Sep 2006 13:06:44 +0000 |
parents | eccf441ab9ff |
children | 2c43912bb46a |
files | libass/ass_fontconfig.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);