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 fontformat: "TrueType"(s) $ fc-match -s -v 'sans:fontformat=bdf' | grep fontformat | sort -u fontformat: "BDF"(s) fontformat: "PCF"(s) fontformat: "TrueType"(s) 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: FC_SCALABLE FC_FULLNAME FC_CAPABILITY FC_FONTFORMAT 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.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.