const FcChar8 *dir,
int dir_len,
const FcChar8 *file,
- const FcChar8 *name)
+ const FcChar8 *name,
+ FcConfig *config)
{
FcChar8 path_buf[8192], *path;
int len;
path[dir_len++] = '/';
#endif
strcpy ((char *) path + dir_len, (const char *) file);
- if (!FcStrCmp (name, FC_FONT_FILE_DIR))
+ if (config && !FcConfigAcceptFilename (config, path))
+ ret = FcTrue;
+ else if (!FcStrCmp (name, FC_FONT_FILE_DIR))
{
if (FcDebug () & FC_DBG_CACHEV)
printf (" dir cache dir \"%s\"\n", path);
FcGlobalCacheScanDir (FcFontSet *set,
FcStrSet *dirs,
FcGlobalCache *cache,
- const FcChar8 *dir)
+ const FcChar8 *dir,
+ FcConfig *config)
{
FcGlobalCacheDir *d = FcGlobalCacheDirGet (cache, dir,
strlen ((const char *) dir),
printf ("FcGlobalCacheScanDir add file %s\n", f->info.file);
any_in_cache = FcTrue;
if (!FcCacheFontSetAdd (set, dirs, dir, dir_len,
- f->info.file, f->name))
+ f->info.file, f->name, config))
{
cache->broken = FcTrue;
return FcFalse;
any_in_cache = FcTrue;
if (!FcCacheFontSetAdd (set, dirs, dir, dir_len,
- info.base, FC_FONT_FILE_DIR))
+ info.base, FC_FONT_FILE_DIR, config))
{
cache->broken = FcTrue;
return FcFalse;
}
FcBool
-FcDirCacheReadDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
+FcDirCacheReadDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir, FcConfig *config)
{
FcChar8 *cache_file = FcStrPlus (dir, (FcChar8 *) "/" FC_DIR_CACHE_FILE);
FILE *f;
(name = FcCacheReadString (f, name_buf, sizeof (name_buf))))
{
if (!FcCacheFontSetAdd (set, dirs, cache_file, dir_len,
- file, name))
+ file, name, config))
goto bail3;
if (file != file_buf)
free (file);