<div dir="ltr">Hi,<div><br></div><div>Since fontconfig validates a cache during loading it, you'll see your concern after this change right.</div><div>I think we need to implement another way or API etc for that use case and web font support instead of disabling this check. even checking mtime in this case shouldn't be wanted. let me think more.</div><div><br></div><div>Thanks,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 29, 2015 at 1:41 PM, David Lattimore <span dir="ltr"><<a href="mailto:dml@google.com" target="_blank">dml@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Akira,<div><br></div><div>I have a slightly unusual usage of FontConfig in that I store fonts on a server and get FontConfig to scan them to produce a cache, then transfer the cache to a client which loads it, matches fonts then requests those fonts from the server. Currently in order to load the cache on the client, we create an empty font directory with the same mtime as the font directory on the server. This is already pretty hacky, but it works. I fear with the above change we'd find ourselves creating N dummy files in our client-side "font directory". So if there were some way around these checks, that would be good. Perhaps an API to just load a cache file without needing any font directory at all? I've been meaning to see if I could implement such an API in FontConfig, but haven't gotten to it yet.</div><div><br></div><div>Thanks,</div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 29 July 2015 at 12:31, Akira TAGOH <span dir="ltr"><<a href="mailto:akira@tagoh.org" target="_blank">akira@tagoh.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>I need some comments about making a change in FcCache to work around the kinda race condition in updating caches. please read comments in <a href="https://bugs.freedesktop.org/show_bug.cgi?id=69845" rel="noreferrer" style="display:inline!important" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=69845 </a>for more details of the background.</div><div><br></div><div>As attached at <a href="https://bugs.freedesktop.org/attachment.cgi?id=116870" rel="noreferrer" style="display:inline!important" target="_blank">https://bugs.freedesktop.org/attachment.cgi?id=116870</a> I'm proposing the change to store the number of files in a directory to FcCache so that fontconfig can detect this fault; AFAICS the number of font files being reported from the cache and the actual one is different and it is same or newer than the mtime of directory so fontconfig doesn't update then.</div><div><br></div><div>The change itself is quite simple and no extra cost to store it. even if it is going to update the cache by this change, it is supposed to be updated per se. the concern is, it may be likely to happen during running applications.</div><div><br></div><div>Any other concerns or comment on this change?<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div>Akira TAGOH</div>
</font></span></div></div>
<br></div></div>_______________________________________________<br>
Fontconfig mailing list<br>
<a href="mailto:Fontconfig@lists.freedesktop.org" target="_blank">Fontconfig@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/fontconfig" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/fontconfig</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Akira TAGOH</div>
</div>