<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Make fontconfig cache relocatable"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101889#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - 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:alexl@redhat.com" title="Alexander Larsson <alexl@redhat.com>"> <span class="fn">Alexander Larsson</span></a>
</span></b>
<pre>Yes, we could do it lazily, true. However, I don't understand what you mean
about sharing with others.
Here is what i imagine:
[Shared mmaped cache data]
...
FontName="TheFont"
FileName=offset 0
...
FontName="OtherFont"
FileName=offset 1
...
FileNameTable
[offset 0]
[offset 12]
FileNameStrings
"TheFont.ttf\0OtherFont.ttf\0"
This would be readonly and shared by all clients.
To go from a cache element to a filename you would normally
go from offset in FileNameTable to offset in FileNameStrings, all shared by
everyone. However, in the case where the cache is loaded in a non-canonical
location, you'd allocate an in-memory (non-shared) FileNameTable and
FileNameStrings array, which would would rewrite and use instead.
Such a setup could be lazy, either doing everything the first time you get a
filename, or it could allocate filenames one-by-one lazily. (Although then you
create a lot of small allocations instead of a single large one.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>