Skip to content

Add font readiness wait to create() function in p5.Font.js #7882

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 1 commit into from
Jun 5, 2025

Conversation

sophyphile
Copy link

Resolves #7823

Changes:
Adds an await document.fonts.ready inside the create() function in p5.Font.js to ensure the font is fully loaded before the function resolves. This should guarantee that rendering depending on the font won't proceed prematurely.

PR Checklist

  • npm run lint passes

Copy link

welcome bot commented Jun 5, 2025

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

@perminder-17 perminder-17 self-requested a review June 5, 2025 18:39
Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

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

I tried manually rerunning the tests on CI a few times and it seems to pass each time, so maybe this was the missing piece? Let's merge this in, and we can always reopen the issue if it seems like it's still happening. Thanks!

@davepagurek davepagurek merged commit 53c9cf8 into processing:dev-2.0 Jun 5, 2025
4 checks passed
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.

2 participants