FcDirCacheUnlink (dir, config);
if (!force)
- was_valid = FcDirCacheValid (dir, config);
+ was_valid = FcDirCacheValid (dir);
if (!FcDirScanConfig (set, subdirs, FcConfigGetBlanks (config), dir, force, config))
{
printf ("caching, %d fonts, %d dirs\n",
set->nfont, nsubdirs (subdirs));
- if (!FcDirCacheValid (dir, config))
+ if (!FcDirCacheValid (dir))
{
fprintf (stderr, "%s: failed to write cache\n", dir);
(void) FcDirCacheUnlink (dir, config);
FcChar8 *font;
FcChar8 *file;
- font = FcNameUnparseEscaped (fs->fonts[j], FcFalse);
+ font = FcNameUnparse (fs->fonts[j]);
if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch)
printf ("%s: ", file);
printf ("%s\n", font);
typedef struct _FcValue {
FcType type;
union {
- const FcChar8 *s;
+ const FcChar8 *s;
int i;
FcBool b;
double d;
- const FcMatrix *m;
- const FcCharSet *c;
+ const FcMatrix *m;
+ const FcCharSet *c;
void *f;
const FcPattern *p;
- const FcLangSet *l;
+ const FcLangSet *l;
} u;
} FcValue;
_FCFUNCPROTOBEGIN
FcBool
-FcDirCacheValid (const FcChar8 *cache_file, FcConfig *config);
-
-FcBool
-FcDirCacheHasCurrentArch (const FcChar8 *dir, FcConfig *config);
-
-FcBool
-FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config);
+FcDirCacheValid (const FcChar8 *cache_file);
/* fcblanks.c */
FcBlanks *
FcStrList *
FcConfigGetFontDirs (FcConfig *config);
-const FcChar8 *
-FcConfigNormalizeFontDir (FcConfig *config,
- const FcChar8 *d);
-
FcStrList *
FcConfigGetConfigDirs (FcConfig *config);
FcChar8 *
FcNameUnparse (FcPattern *pat);
-FcChar8 *
-FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
-
/* fcpat.c */
FcPattern *
FcPatternCreate (void);
return ret;
}
-FcBool
-FcDirCacheValid (const FcChar8 *dir, FcConfig *config)
+static FcBool
+FcDirCacheValidConfig (const FcChar8 *dir, FcConfig *config)
{
return FcDirCacheProcess (config, dir, FcDirCacheValidate, NULL, NULL);
}
+FcBool
+FcDirCacheValid (const FcChar8 *dir)
+{
+ FcConfig *config;
+
+ config = FcConfigGetCurrent ();
+ if (!config)
+ return FcFalse;
+
+ return FcDirCacheValidConfig (dir, config);
+}
+
void
FcDirCacheUnmap (FcCache *cache)
{
FcBool
FcDirCacheLoad (int fd, off_t size, void *closure);
+FcBool
+FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config);
+
/* fccfg.c */
FcBool
FcBool
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
+FcChar8 *
+FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
+
/* fclist.c */
FcBool