- if (stat (builddir.to_str0 (), &statbuf) == 0)
- dirs.push (builddir.to_str0 ());
- else
- {
- dirs.push (prefix_directory + "/fonts/otf/");
- dirs.push (prefix_directory + "/fonts/type1/");
- dirs.push (prefix_directory + "/fonts/svg/");
- }
+ /*
+ This is a terrible kludge, but there is apparently no way for
+ FontConfig to signal whether it needs to rescan directories.
+ */
+ if (!is_file ((char*)cache_file))
+ message (_f ("Rebuilding FontConfig cache %s. this may take a while...", cache_file));
+
+ vector<string> dirs;
+
+ dirs.push_back (prefix_directory + "/fonts/otf/");
+ dirs.push_back (prefix_directory + "/fonts/type1/");