GNOME Bugzilla – Bug 720129
jhbuild's fontconfig setup makes installing cantarell useless
Last modified: 2014-03-06 12:49:54 UTC
out of the box, we get a fonts.conf file that looks like so: <!-- Font directory list --> <dir>/usr/share/fonts</dir> <dir prefix="xdg">fonts</dir> <!-- the following element will be removed in the future --> <dir>~/.fonts</dir> where 'xdg' means ~/.local/share, not the full system XDG_DATA_DIRS. This means that fontconfig is not searching in PREFIX/share/fonts at all, which is where we install cantarell. We can tweak the default fonts dir: --with-default-fonts=/home/desrt/jhbuild/install/share/fonts and we can add some extras, too: --with-add-fonts=/usr/local/lib/X11/fonts,/usr/local/share/fonts,/usr/share/fonts I'm not sure how we might reasonably generate this list from jhbuild's configuration without adding a new feature to jhbuild (which I would consider distasteful, for this one purpose) or some sort of patch to the autogen script of fontconfig... What might be best of all, though, is to be able to teach fontconfig about XDG_DATA_DIRS and have it look in XDG_DATA_DIRS/fonts by default.
Created attachment 271065 [details] [review] fontconfig: tweak font path Change the font path to include ${prefix}/share/fonts from jhbuild so that it will find fonts installed by jhbuild (such as Cantarell) We also look in /usr/local/share/fonts and /usr/share/fonts. Strictly speaking, we should check all of the XDG_DATA_DIRS, but this would be a much larger patch.
Review of attachment 271065 [details] [review]: On one hand, it's unfortunate we're replicating fontconfig's default search path in the jhbuild configure. On the other hand, we do have Cantarell in jhbuild. And I don't care much because I never built fontconfig via jhbuild.
Attachment 271065 [details] pushed as 5241435 - fontconfig: tweak font path