[Fontconfig] [PATCH] fc-list: Exit with an error for invalid patterns
akira at tagoh.org
Thu Oct 3 04:03:02 PDT 2013
just committed the change to exit with the error code when
FcNameParse() failed. it could be improved later on for more details,
what exactly was wrong.
On Fri, Sep 27, 2013 at 3:28 PM, Akira TAGOH <akira at tagoh.org> wrote:
> 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.
> Akira TAGOH
More information about the Fontconfig