Commit 34b5c949 authored by Akira TAGOH's avatar Akira TAGOH

Do not mix up font dirs into the list of config dirs

parent 57103773
......@@ -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);
......@@ -3206,7 +3206,10 @@ 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment