Improve WebGL font error message to suggest textFont() usage#8494
Improve WebGL font error message to suggest textFont() usage#8494yugalkaushik wants to merge 2 commits intoprocessing:mainfrom
Conversation
|
🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors! Thank You! |
|
If the test runs, then this sounds reasonable and helpful! I checked the failing test and I'm not sure what was up, I reran. If it fails, then code would need to be updated so tests do pass. Minor wording revision to keep the message same length:
|
Improves the error message when rendering text in WebGL mode without properly setting a font.
Problem:
The current error "only Opentype (.otf) and Truetype (.ttf) fonts are supported" is misleading when users have loaded a valid font but forgot to call textFont().
Solution:
Added clarification: "Make sure to set the font using textFont() before drawing text."
PR Checklist
npm run lintpasses