diff options
Diffstat (limited to 'fc-cache')
-rw-r--r-- | fc-cache/fc-cache.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index 1e8fdf2..7d01ccf 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -93,6 +93,7 @@ usage (char *program) exit (1); } +#if 0 static int nsubdirs (FcStrSet *set) { @@ -222,6 +223,7 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool FcStrListDone (list); return ret; } +#endif int main (int argc, char **argv) @@ -268,12 +270,20 @@ main (int argc, char **argv) if (systemOnly) FcConfigEnableHome (FcFalse); - config = FcInitLoadConfig (); + FcCacheForce (FcTrue); + /* need to use FcInitLoadConfig when we use dirs */ + FcInit (); + config = FcConfigGetCurrent (); if (!config) { fprintf (stderr, "%s: Can't init font config library\n", argv[0]); return 1; } + + /* We don't yet have per-directory caches. */ + ret = (FcCacheWrite (config) == FcFalse); + +#if 0 if (argv[i]) { dirs = FcStrSetCreate (); @@ -298,6 +308,7 @@ main (int argc, char **argv) else list = FcConfigGetConfigDirs (config); ret = scanDirs (list, config, argv[0], force, verbose); +#endif /* * Now we need to sleep a second (or two, to be extra sure), to make * sure that timestamps for changes after this run of fc-cache are later |