Closed Bug 857922 Opened 11 years ago Closed 11 years ago

fontconfig change breaks webfonts rendering under linux


(Core :: Graphics, defect)

20 Branch
Not set





(Reporter: elad, Unassigned)



See downstream bug

Basically, this fontconfig change makes passing a filename to all FC queries mandatory. Firefox passes an empty string, which makes fontconfig matching fail and as a result webfonts fail to render and Firefox uses system fonts instead.
Component: Untriaged → Graphics
Product: Firefox → Core
According to fontconfig docs:

<quote src="">
  FcFreeTypeQueryFace -- compute pattern from FT_Face

  #include <fontconfig.h>
  #include <fcfreetype.h>

  FcPattern * FcFreeTypeQueryFace(const FT_Face face, const FcChar8 *file, int id, FcBlanks *blanks);


  Constructs a pattern representing 'face'. 'file' and 'id' are used solely as data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY).

it doesn't look as though the filename should be required here, if we don't care about it being available as a pattern element. Indeed, with a downloaded font, there *is* no filename - the font data associated with the FT_Face exists only in RAM, it is not stored in a file.

So this looks to me like a breaking change in the semantics of the fontconfig API. :(
Fedora's fontconfig maintainer replied:
>Well, you were just relying on the undocumented behavior. it didn't even mention whether giving an empty string as file is acceptable or not. that said I'm working on supporting such case in fontconfig now.

This issue is fixed in fontconfig-2.10.92-3.fc19, but:

>moving back to fontconfig for hash issue but you may still see another issue with regard to removing FC_FILE from the pattern.
fyi, possttibly related.

this firefox-vs-fontconfig-vs-webfont issue has manifested here:


webfonts display with 'new' fontconfig breaks completely on ALL tested Firefox versions
webfonts display with 'old' fontconfig breaks paritally on current/old tested Firefox versions
webfonts display with 'old' fontconfig works on next (aurora/nightly) tested Firefox versions

not just on Fedora; openSUSE (& at least 1 windows instance of FF) are affected
You probably didn't read my previous comment, so read again:

> it was fixed in fontconfig-2.10.92-3.fc19

since I don't see any other issues here (and fontconfig is not used on Windows), I suggest you contact the fontconfig maintainer in openSUSE and ask them to make an update.
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.