-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fix segfault when passing empty StringIO/File object to Font #2548
Conversation
Added tests and freetype font fix
I also fixed two unrelated freetype module tests here that I noticed were failing locally while testing - but were not failing on the CI. At some point a fix that was added for a quit() and init() segfault and the way the tests multithread on the CI causes these two particular tests which I changed, which use a class level It is not a real functional change but it means we can get these tests to pass both locally and on the CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Approving this PR because this LGTM, but I wonder if this is something that should also be fixed upstream on SDL_ttf
if this is an issue on their end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another improvement idea, we should use SDL_RWsize(source)
instead of doing source->size(source)
. Shorter and also looks more robust
|
Related to #2295
Also fixes freetype submodule's
Font
to track submodule generation on__new__
instead of on__init__
for more reliable performance of the unit tests with uninitialized Font objects. Previously I was getting different results running on the CI versus locally.