After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720129 - jhbuild's fontconfig setup makes installing cantarell useless
jhbuild's fontconfig setup makes installing cantarell useless
Product: jhbuild
Classification: Infrastructure
Component: module sets
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Reported: 2013-12-09 19:26 UTC by Allison Karlitskaya (desrt)
Modified: 2014-03-06 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---

fontconfig: tweak font path (1.27 KB, patch)
2014-03-06 04:28 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2013-12-09 19:26:25 UTC
out of the box, we get a fonts.conf file that looks like so:

<!-- Font directory list -->

        <dir prefix="xdg">fonts</dir>
        <!-- the following element will be removed in the future -->

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:


and we can add some extras, too:


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.
Comment 1 Allison Karlitskaya (desrt) 2014-03-06 04:28:02 UTC
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.
Comment 2 Colin Walters 2014-03-06 11:40:47 UTC
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.
Comment 3 Allison Karlitskaya (desrt) 2014-03-06 12:49:50 UTC
Attachment 271065 [details] pushed as 5241435 - fontconfig: tweak font path