[Fontconfig] Fontconfig cache file update fails on Windows (also Cygwin)
L A Walsh
fonts at tlinx.org
Wed Jan 11 19:20:43 UTC 2017
Masamichi Hosoda wrote:
> Hello,
>
> I've found an issue of fontconfig on Windows.
> If you have an old cache file and need updating,
> the updating fails on Windows (both MinGW and Cygwin).
>
> I've created a patch and reported it to Bugzilla.
> https://bugs.freedesktop.org/show_bug.cgi?id=99360
>
----
You state that you can't update a locked file on Windows and
have created a patch to update the font file without locking it.
I know little about fontconfig (I'm NOT one of the authors),
but it seems that getting a read-write lock before updating a file
would be a normal way to update a file that might have multiple
updaters.
If someone starts up two programs that both try to update the
cache at the same time, what will happen on windows if you
remove the locking?
I'm going to guess that under posix, you should be able to update
a file that you hold a read-write lock on. That means under cygwin
it should work. Have you reported the bug to the cygwin people?
As for the MingGW case, you may have to find a way to lock access
to the file in such a way as to prevent multiple updates AND
allow update or writing.
-linda
More information about the Fontconfig
mailing list