<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Make fontconfig cache relocatable"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101889#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Make fontconfig cache relocatable"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101889">bug 101889</a>
from <span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span></b>
<pre>Proposed implementation:
<a href="https://cgit.freedesktop.org/~tagoh/fontconfig/log/?h=relpath-cache-2">https://cgit.freedesktop.org/~tagoh/fontconfig/log/?h=relpath-cache-2</a>
The features of this implementation and highlight:
* Writing out FC_FILE value as the fixed string (with the length of PATH_MAX)
to allow rewriting it according to the currrent fonts.conf and the location of
cache dirs.
* Changing the cache basename from the hash to the device ID + inode number.
which is required to avoid scanning fonts (and dirs) when the targeted dirs
aren't yet loaded as caches.
* For those changes, FC_LEAF_FILE, FC_DEV_ID, and FC_INODE properties is added
to cache and bumped the cache version to 8.
* Set FONTCONFIG_LOOKUP_FONTPATH to 1 to enable this feature. when loading
caches through mmap(), need to re-mapping it with MAP_PRIVATE because rewrite
has to be done without affecting the original cache. so we can share it with
host and bind-mounted env. this is the sort of workaround to reduce the cost on
env where this isn't needed.
The last one is surely a disadvantage on this implementation because
applications can't see the benefit of updates coming from other processes
through MAP_SHARED. so they have to restart applications every time when caches
is updated.
Also this is only enabled for non-win32 so far because I'm not confident if
this works on win32.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>