[Fontconfig] Config Parsing Error Reporting

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Sat Jul 6 04:16:39 UTC 2019


On Sat, 6 Jul 2019 16:01:44 +1200, I wrote:

> The problem seems to be caused by the “complain = FcFalse;” line in
> the _FcConfigParse routine in fcxml.c.

OK, I think I understand what that line is trying to do: it’s to stop
two separate “cannot load” messages from coming up. Here’s an
alternative patch, that satisfies that aim while still allowing the
call to return false on error:

diff --git a/src/fcxml.c b/src/fcxml.c
index 2e5898e..1591c5a 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -3620,7 +3620,7 @@ bail0:
        FcConfigMessage (0, FcSevereError, "Cannot %s default config file", load ? "load" : "scan");
    return FcFalse;
     }
-    return FcTrue;
+    return ret;
 }


More information about the Fontconfig mailing list