summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2018-02-05 12:47:01 +0900
committerAkira TAGOH <akira@tagoh.org>2018-02-05 12:47:01 +0900
commit34b5c949d51fcc8eafe2301ca8f539f735e31522 (patch)
tree92e5427b3a1f193761f518bd1cb44c6a3b26fb23 /src
parent5710377301f7193f133103cede00e81a2051eb51 (diff)
Do not mix up font dirs into the list of config dirs
Diffstat (limited to 'src')
-rw-r--r--src/fccfg.c8
-rw-r--r--src/fcinit.c2
-rw-r--r--src/fcint.h4
-rw-r--r--src/fcxml.c7
4 files changed, 6 insertions, 15 deletions
diff --git a/src/fccfg.c b/src/fccfg.c
index 2351ac23..eb0b76dc 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -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)
{
diff --git a/src/fcinit.c b/src/fcinit.c
index 8bb0fd4f..30646dc1 100644
--- a/src/fcinit.c
+++ b/src/fcinit.c
@@ -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;
diff --git a/src/fcint.h b/src/fcint.h
index 537023fc..5de311f0 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -659,10 +659,6 @@ FcConfigAddFontDir (FcConfig *config,
const FcChar8 *d);
FcPrivate FcBool
-FcConfigAddDir (FcConfig *config,
- const FcChar8 *d);
-
-FcPrivate FcBool
FcConfigAddCacheDir (FcConfig *config,
const FcChar8 *d);
diff --git a/src/fcxml.c b/src/fcxml.c
index e6cc6b8f..7c8aaac4 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -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;