Don't remember exactly why (I did track it down once). Anyway, should switch the utilities to FcPatternFormat().
That looks like because FcNameUnparse() ignores FC_FILE only. what's wrong with simply getting rid of "!strcmp (o->object, FC_FILE)" from the expression?
Using FcPatternFormat() may be an idea. but the issue would be how to get the better "format" string against the FcObjectSet.
Once getting rid of the above code, the result looks like:
% ./fc-match/fc-match sans file
proposed one line patch:
That's not enough. I guess your change breaks fc-list. I'll fix by switching fc-list et al. to using FcPatternFormat() I guess.
Author: Behdad Esfahbod <email@example.com>
Date: Mon Jun 20 11:22:17 2011 -0400
Bug 26718 - "fc-match sans file" doesn't work
- Do not throw away FC_FILE in FcNameUnparse
- Update the builtin "fclist" format to remove FC_FILE properly instead
- Switch fc-list to use FcPatternFormat()
Note that I had previously broken fc-list and it was not showing the
file name anymore. No one noticed that it seems! Now fixed.
Aha, thanks. works fine for me.