Trying to use a PostScript Type 1 font with FcFreeTypeQueryFace() fails. The function returns NULL. It appears the reason is that FcFreeTypeQueryFace uses FT_Load_Sfnt_Table to hash the font data, which works for TrueType and OpenType fonts, but not for other fonts. (It then proceeds trying to open the name as a file, which makes absolute no sense for memory fonts.) I fail to understand why not being able to hash the font would make fontconfig try to open (essentially) random files and fail to provide the font to the application. Tested with git 03216ccf4ca0 and the latest release.
Ok, I think best way to handle this is to use the FT_Stream API to get the font file data.
(In reply to comment #1) > Ok, I think best way to handle this is to use the FT_Stream API to get the > font file data. Why not revert the hash feature entirely? I can't even think of a valid use of this feature, and it's obscure at best.
Akira, do you think you can take a look at this quickly? If not, I'll try to make it at least not return NULL for now.
Sorry, I was on long vacation and will take a look tomorrow.
Sorry for late action. please try http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz63922 This my repo contains a workaround to skip adding a hash value into the cache and take care of the matching in that case. that wouldn't affects the ordering of fonts though, please let me know if something still goes wrong for you.
Unfortunately I can not test, because I took this opportunity to convert the only postscript font file I used to open type.
me neither. anyway, after patching out, FcFreeTypeQueryFace() works fine with even a Type42 font, I guess it should works for Type1 too. I've merged the change to master.
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.