Use mmapping to avoid unicode issues on windows #94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FreeType uses a method to open files on windows that seems to be incompatible with unicode, see https://stackoverflow.com/questions/10075032/can-freetype-functions-accept-unicode-filenames. Another option then is to use
FT_New_Memory_Face
which I've done here. I could have also read the file into memory but it seemed to me mmapping would be a bit lighter on RAM? Also, I'm not 100% sure if the way I immediately close the io after mmapping is correct, or if it should stay open for the lifetime of the mmapped array.Fixes #85
Reason for this PR were user reports where Makie couldn't load its own default font file due to special characters in the path.