[Fontconfig-bugs] [Bug 101889] Make fontconfig cache relocatable
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Aug 2 13:29:36 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101889
--- Comment #13 from Alexander Larsson <alexl at redhat.com> ---
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20170802/11cee863/attachment.html>
More information about the Fontconfig-bugs
mailing list