[Fontconfig] [PATCH] Make the cache filenames determinstic

Keith Packard keithp at keithp.com
Tue Oct 30 21:44:42 UTC 2018


Akira TAGOH <akira at tagoh.org> writes:

> just reminds me that there should be some options to do this but
> wasn't too much if we keep compatibility in API and conditions not to
> modify application-side. given that we revert this change and are
> going to keep API compatibility and no changes in applications, what
> we can do is probably to let fontconfig know the directory mapping
> tables through a file and read it. though they need to re-generate it
> every time if the mappings is changed every time.

Ok, so what I've written today is an extension to the config file 'dir'
element which provides a mapping value back to the underlying system
font directory. flatpaks can then use this mechanism to locate the
correct cache files by adding a 'map' attribute like this:

        <dir map="/usr/share/fonts">/run/host/fonts</dir>

If the fontconfig version supplied in the flatpak supports this
mechanism, it will re-use the host font cache. Otherwise, it will
rebuild the font cache.

Older fontconfig versions ignore the new attribute, so flatpak
configuration can always include it.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20181030/81f84a30/attachment.sig>


More information about the Fontconfig mailing list