If user sets fontformat in the match pattern, only fonts of the formats specified should be returned. This doesn't seem to work right now:
$ fc-match -v 'sans:fontformat=bdf' | grep fontformat
$ fc-match -s -v 'sans:fontformat=bdf' | grep fontformat | sort -u
fontformat: "Type 1"(s)
This is useful for apps like OO.o that can't handle CFF OpenType fonts.
Another thing brought up in the same thread in Fedora font list recently is, how does fontconfig prefer between fonts of the same family and version, but different type? It should prefer CFF over TrueType over other stuff. Is that how it works? Or it's nondeterministic at this time?
FWIW, these are the elements set by fcfreetype.c that are not matched:
I also tried breaking FC_CAPABILITY from one string into multiple ones, but seems like the cache only saves the first value for each element.
SCALABLE seems to be more useful.
Right now all the necessary information what the names of the element should be compared are hardcoded. is it maybe a good idea to export this sort of information into the external? this might possibly be easy to break fontconfig by mistake though, that would gives us the easy way to add the unknown/brand-new elements into fontconfig also, as long as the object is known in fontconfig.
Akira, do you also want to fix this perhaps?
Ah, yeah. will do that too.
added fontformat to the matcher.