Skip to content

Commit 68b37e7

Browse files
committed
Improve WebGL font error message to suggest textFont() usage
1 parent ad26404 commit 68b37e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/webgl/text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ function text(p5, fn) {
685685

686686
if (!p5.Font.hasGlyphData(this.states.textFont)) {
687687
console.log(
688-
'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts with glyph data are supported'
688+
'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts with glyph data are supported. Make sure to set the font using textFont() before drawing text.'
689689
);
690690
return;
691691
}

0 commit comments

Comments
 (0)