Skip to content

Use mmapping to avoid unicode issues on windows #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025
Merged

Conversation

jkrumbiegel
Copy link
Collaborator

@jkrumbiegel jkrumbiegel commented Apr 7, 2025

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.

Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.16%. Comparing base (fe61188) to head (7c5a89f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   94.56%   93.16%   -1.41%     
==========================================
  Files           6        6              
  Lines         313      322       +9     
==========================================
+ Hits          296      300       +4     
- Misses         17       22       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jkrumbiegel jkrumbiegel requested a review from SimonDanisch April 7, 2025 15:01
@jkrumbiegel
Copy link
Collaborator Author

@SimonDanisch any opinion on this?

@SimonDanisch SimonDanisch merged commit 7c84031 into master May 29, 2025
10 of 11 checks passed
@SimonDanisch SimonDanisch deleted the jk/mmap branch May 29, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Makie standard font fails loading within non-ascii path depot path
2 participants