-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allowing to pass font as file-like objects #202
Conversation
A couple things I want to check:
|
Ok. I will do the modifications and pull them back to you. The reason I kept Do you think it's ok if I change the |
Looking at this a bit more, I'm not sure that file_like.buf is generally valid. It's certainly not in the declared interface for StringIO or file, where one can rely on read/write/close, and getvalue for stringio. I think it's probably safe to rename that parameter, it might be safer to do something like:
Keeping the bytes as an instance variable should satisfy the read only buffer that's required as long as the font's in use. At some point, I intend to grab as many packages as I can from debian and wherever else so that I can grep through them to see how PIL is being used to check compatibility. This would be something I'd like to test, greping for FreeTypeFont | grep file |
Ok thank you. I did the changes and added the unitests. So I think it should be ok now ! |
Thanks for the update. I'll review this soon. I want to look closely and carefully. |
I've added a few changes in #209.
Thanks for your contribution. |
This is the update to allow to pass fonts as file-like objects. Thank you wiredfool and aclark4life.