[Fontconfig] [PATCH] fc-list: Exit with an error for invalid patterns
akira at tagoh.org
Thu Sep 26 23:28:25 PDT 2013
On Wed, Sep 25, 2013 at 9:55 PM, Behdad Esfahbod <behdad at behdad.org> wrote:
> On 13-09-24 10:09 PM, Akira TAGOH wrote:
>> fc-list is designed to return the errror code only when --quiet option
>> is set and no fonts matched. otherwise always 0. well, at least at
>> this moment. so that is the expected behavior and you should see same
>> result on box where no fonts installed.
> But if the input pattern is invalid, that's good reason to return an error
> code even without --quiet. It's a usage error. Plus, returning 0 and no
> fonts means "no fonts matched", where in fact the pattern was invalid.
We should deal with "no fonts matched" and the kind of parser error
differently IMHO though, I see what you mean. I think more detailed
messages on the error may be required because there are no way to see
what was wrong at this moment and should reflects to the return code
with/without --quiet option too.
More information about the Fontconfig