+2005-11-29 Patrick Lam <plam@mit.edu>
+ * src/fccfg.c (FcConfigBuildFonts):
+ * src/fccache.c (FcCacheReadDirs):
+
+ Make the perf guys hate me a bit less: hoist the directory-name
+ FcConfigAcceptFont check for cached fonts up to directory cache
+ read time, rather than running it for each font.
+
2005-11-29 Patrick Lam <plam@mit.edu>
* src/fccfg.c (FcConfigBuildFonts):
* src/fcint.h:
*/
while ((dir = FcStrListNext (list)))
{
+ if (!FcConfigAcceptFilename (config, dir))
+ continue;
+
/* freed below */
file = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + FC_MAX_FILE_LEN + 1);
if (!file)
for (i = 0; i < cached_fonts->nfont; i++)
{
- FcChar8 *cfn, *cfd;
+ FcChar8 *cfn;
FcPatternGetString (cached_fonts->fonts[i], FC_FILE, 0, &cfn);
- cfd = (FcChar8 *)FcCacheFindBankDir (cached_fonts->fonts[i]->bank);
if (FcConfigAcceptFont (config, cached_fonts->fonts[i]) &&
- (cfn && FcConfigAcceptFilename (config, cfn)) &&
- (cfd && FcConfigAcceptFilename (config, cfd)))
+ (cfn && FcConfigAcceptFilename (config, cfn)))
FcFontSetAdd (fonts, cached_fonts->fonts[i]);
cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */