+2005-11-29 Patrick Lam <plam@mit.edu>
+ * src/fccfg.c (FcConfigBuildFonts):
+ * src/fcint.h:
+ * src/fcpat.c (FcPatternFindFullFname):
+
+ Don't make FcPatternFindFullFname available to fccfg, it's not
+ really safe. Instead go through FcPatternGetString (sorry,
+ perf guys.) Also, use globs for dirs as well.
+
2005-11-28 Patrick Lam <plam@mit.edu>
* src/fccfg.c (FcConfigBuildFonts):
for (i = 0; i < cached_fonts->nfont; i++)
{
- const char * cfn = (FcChar8 *)FcPatternFindFullFname
- (cached_fonts->fonts[i]);
+ FcChar8 *cfn, *cfd;
+ 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)))
+ (cfn && FcConfigAcceptFilename (config, cfn)) &&
+ (cfd && FcConfigAcceptFilename (config, cfd)))
FcFontSetAdd (fonts, cached_fonts->fonts[i]);
cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */
void
FcPatternAddFullFname (const FcPattern *p, const char *fname);
-const char *
-FcPatternFindFullFname (const FcPattern *p);
-
void
FcPatternTransferFullFname (const FcPattern *new, const FcPattern *orig);
static FcPatternEltPtr
FcPatternEltPtrCreateDynamic (FcPatternElt * e);
+static const char *
+FcPatternFindFullFname (const FcPattern *p);
+
/* If you are trying to duplicate an FcPattern which will be used for
* rendering, be aware that (internally) you also have to use
* FcPatternTransferFullFname to transfer the associated filename. If
pb->next->m.fname = fname;
}
-const char *
+static const char *
FcPatternFindFullFname (const FcPattern *p)
{
struct patternDirBucket *pb;