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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.14%. Comparing base (a018db8) to head (a7ee912).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   94.55%   93.14%   -1.41%     
==========================================
  Files           6        6              
  Lines         312      321       +9     
==========================================
+ Hits          295      299       +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
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
1 participant