[Fontconfig-bugs] [Bug 101889] Make fontconfig cache relocatable
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Sep 15 13:33:04 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101889
--- Comment #32 from Alexander Larsson <alexl at redhat.com> ---
I don't think the alias table works as implemented.
For example, say on the host we have /usr/share/fonts. We'll generate a .uuid
file for it and a cache file based on the hash of that. Then the app reads
this, but in a different location, say /run/host/fonts.
First we load /run/host/fonts/.uuid and use that to find the host-side cache
file. But its cache->dirname is /usr/share/fonts, so we add to the alias table:
/usr/share/fonts -> /run/host/fonts
This means that if a fc pattern has a path of /usr/share/fonts/foo we will
instead load it at /run/host/fonts/foo, which is correct if we got the pattern
from the cache above.
However, what if you're loading a font from the runtime, which is properly in
/usr/share/fonts in the sandbox? This will *also* be mapped via the alias
table.
You can't use a global mapping like that, it has to depend on what cache the
pattern came from.
Also, why are all the hashes you added using FcStrHashIgnoreCase for the
filename? You're using regular strcmp later, so its not like the hash lookup
will be case insensitive anyway.
--
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/20170915/a4607eae/attachment.html>
More information about the Fontconfig-bugs
mailing list