Improve WebGL font error message to suggest textFont() usage by yugalkaushik · Pull Request #8513 · processing/p5.js
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 - Inline reference is included / updated
- Unit tests are included / updated