diff options
author | Akira TAGOH <akira@tagoh.org> | 2015-03-23 13:30:59 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2015-03-23 13:31:57 +0900 |
commit | c965c9f67759585909fa03236bad826de85bd39c (patch) | |
tree | 26d95fba488e8928d9244415e2c01db61a396a31 /src | |
parent | 7301f2f02816c5d44ee75dd0689c806c5aabdbda (diff) |
Bug 89617 - FcConfigAppFontAddFile() returns false on any font file
Prior to the change of 32ac7c75e8db0135ef37cf86f92d8b9be000c8bb
FcConfigAppFontAddFile() always returned FcTrue no matter what
fonts was added. after that, it always returned FcFalse because
adding a font doesn't add any subdirs with FcFileScanConfig().
so changing that to simply ignore it.
Also fixing it to return FcFalse if non-fonts was added, i.e.
FcFreeTypeQuery() fails.
https://bugs.freedesktop.org/show_bug.cgi?id=89617
Diffstat (limited to 'src')
-rw-r--r-- | src/fccfg.c | 4 | ||||
-rw-r--r-- | src/fcdir.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/fccfg.c b/src/fccfg.c index b92270b6..54674937 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -2227,7 +2227,9 @@ FcConfigAppFontAddFile (FcConfig *config, FcStrSetDestroy (subdirs); return FcFalse; } - if ((sublist = FcStrListCreate (subdirs))) + if (subdirs->num == 0) + ret = FcTrue; + else if ((sublist = FcStrListCreate (subdirs))) { while ((subdir = FcStrListNext (sublist))) { diff --git a/src/fcdir.c b/src/fcdir.c index 00dee725..2e7f0dc7 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -136,6 +136,8 @@ FcFileScanFontConfig (FcFontSet *set, ret = FcFalse; } } + else + ret = FcFalse; id++; } while (font && ret && id < count); return ret; |