WIP: Rewrite Cairo font caching without mmap
The font caching mechanism in CairoFontEngine.cc
uses the mmap
system call, which doesn't exist on Windows. As a result, there is no font caching on Windows. Also, platform-dependence of the code makes debugging extra difficult. See !798 (closed) for an example.
This merge request reimplements font caching using standard C++, notably file streams. That way, Windows gains caching support, the same code is used on all platforms, and issues like !798 (closed) become easier.
I put the changes into four separate commits for better reviewability, but supposedly in the end everything should be squashed into one.
The MR is marked as WIP because I would like to make sure that the changes do not make the code slower. But I would be happy about some early reactions.