Comment 5 for bug 1177995

Revision history for this message
In , Freedesktop (freedesktop) wrote :

(In reply to comment #0)
> firefox is calling FcFreeTypeQueryFace for webfonts like this:
>
> pattern =
> (*sQueryFacePtr)(mFace, gfxFontconfigUtils::ToFcChar8(""), 0,
> NULL);
>
> This fails now because we require the valid filename to generate hash value
> and if not, simply fails because the matcher behaves wrong if some objects
> are available or unavailable in the cache.

In FcFreeTypeQueryFace (as opposed to FcFreeTypeQuery) we should use FT_Load_Sfnt_Table() to get the font data and hash that.

> One idea to support this case is to define constant value and add an invalid
> hash to the cache?
>
> FWIW FcPatternDel should warn if one is going to delete objects which is in
> the matcher perhaps.

Humm. Not sure about that.

The matcher should not fail if something is missing. It should simply not match.