Do not mix up font dirs into the list of config dirs
This commit is contained in:
parent
5710377301
commit
34b5c949d5
|
@ -383,7 +383,7 @@ main (int argc, char **argv)
|
|||
FcStrSetDestroy (dirs);
|
||||
}
|
||||
else
|
||||
list = FcConfigGetConfigDirs (config);
|
||||
list = FcConfigGetFontDirs (config);
|
||||
|
||||
if ((processed_dirs = FcStrSetCreate()) == NULL) {
|
||||
fprintf(stderr, _("Out of Memory\n"));
|
||||
|
|
|
@ -520,14 +520,6 @@ FcConfigAddFontDir (FcConfig *config,
|
|||
return FcStrSetAddFilename (config->fontDirs, d);
|
||||
}
|
||||
|
||||
FcBool
|
||||
FcConfigAddDir (FcConfig *config,
|
||||
const FcChar8 *d)
|
||||
{
|
||||
return (FcConfigAddConfigDir (config, d) &&
|
||||
FcConfigAddFontDir (config, d));
|
||||
}
|
||||
|
||||
FcStrList *
|
||||
FcConfigGetFontDirs (FcConfig *config)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ FcInitFallbackConfig (const FcChar8 *sysroot)
|
|||
if (!config)
|
||||
goto bail0;
|
||||
FcConfigSetSysRoot (config, sysroot);
|
||||
if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
|
||||
if (!FcConfigAddFontDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
|
||||
goto bail1;
|
||||
if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR))
|
||||
goto bail1;
|
||||
|
|
|
@ -658,10 +658,6 @@ FcPrivate FcBool
|
|||
FcConfigAddFontDir (FcConfig *config,
|
||||
const FcChar8 *d);
|
||||
|
||||
FcPrivate FcBool
|
||||
FcConfigAddDir (FcConfig *config,
|
||||
const FcChar8 *d);
|
||||
|
||||
FcPrivate FcBool
|
||||
FcConfigAddCacheDir (FcConfig *config,
|
||||
const FcChar8 *d);
|
||||
|
|
|
@ -2156,7 +2156,7 @@ FcParseDir (FcConfigParse *parse)
|
|||
FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
|
||||
else if (!parse->scanOnly && (!FcStrUsesHome (data) || FcConfigHome ()))
|
||||
{
|
||||
if (!FcConfigAddDir (parse->config, data))
|
||||
if (!FcConfigAddFontDir (parse->config, data))
|
||||
FcConfigMessage (parse, FcSevereError, "out of memory; cannot add directory %s", data);
|
||||
}
|
||||
FcStrBufDestroy (&parse->pstack->str);
|
||||
|
@ -3207,6 +3207,9 @@ FcConfigParseAndLoadDir (FcConfig *config,
|
|||
if (FcDebug () & FC_DBG_CONFIG)
|
||||
printf ("\tScanning config dir %s\n", dir);
|
||||
|
||||
if (load)
|
||||
FcConfigAddConfigDir (config, dir);
|
||||
|
||||
while (ret && (e = readdir (d)))
|
||||
{
|
||||
int d_len;
|
||||
|
|
Loading…
Reference in New Issue