Skip to content
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

Unify freetype init codepaths #2801

Merged

Conversation

Starbuck5
Copy link
Member

@Starbuck5 Starbuck5 commented Apr 14, 2024

The freetype.Font init code has a windows codepath and an "everything else" codepath. I think that the windows codepath would work everywhere, so let's try using it everywhere.

Why am I mucking around with this? Because SDL3 changes rwops stuff and freetype looks like it might be the most complex use of rwops we have. If we can make it simpler that will help the transition. This is similar to #2717 in that regard.

The freetype.Font init code has a windows codepath and an "everything else" codepath. I think that the windows codepath would work everywhere, so let's try using it everywhere.
@Starbuck5 Starbuck5 requested a review from a team as a code owner April 14, 2024 04:44
@Starbuck5 Starbuck5 marked this pull request as draft April 14, 2024 04:44
@Starbuck5 Starbuck5 marked this pull request as ready for review April 14, 2024 05:27
@Starbuck5 Starbuck5 added Code quality/robustness Code quality and resilience to changes rwops SDL's IO loading/streaming code freetype pygame.freetype labels Apr 14, 2024
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always a little scary to remove old and less-understood code, but I don't see a reason the windows path should break in the non-windows path.

Thanks for the PR, this is a nice cleanup! 🎉

Copy link
Member

@oddbookworm oddbookworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like Ankith, I don't see any reason this shouldn't work.

@oddbookworm oddbookworm merged commit d30cba5 into pygame-community:main Apr 27, 2024
36 checks passed
@ankith26 ankith26 added this to the 2.5.0 milestone Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality/robustness Code quality and resilience to changes freetype pygame.freetype rwops SDL's IO loading/streaming code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants