From 1c9d54eb07a876ee614214ef663f783ebc90fe3d Mon Sep 17 00:00:00 2001 From: yugalkaushik Date: Wed, 4 Feb 2026 11:58:27 +0000 Subject: [PATCH 1/2] Improve WebGL font error message to suggest textFont() usage --- src/webgl/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/text.js b/src/webgl/text.js index 0e427a57be..1cace7f202 100644 --- a/src/webgl/text.js +++ b/src/webgl/text.js @@ -654,7 +654,7 @@ p5.RendererGL.prototype._renderText = function(p, line, x, y, maxY) { if (!this._isOpenType()) { console.log( - 'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported' + 'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts with glyph data are supported. Make sure to set the font using textFont() before drawing text.' ); return p; } From b73b68283753bfacfdb23eec72cff331dacaa49f Mon Sep 17 00:00:00 2001 From: yugalkaushik Date: Wed, 4 Feb 2026 12:03:36 +0000 Subject: [PATCH 2/2] minor fix --- src/webgl/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/text.js b/src/webgl/text.js index 1cace7f202..3edb888525 100644 --- a/src/webgl/text.js +++ b/src/webgl/text.js @@ -654,7 +654,7 @@ p5.RendererGL.prototype._renderText = function(p, line, x, y, maxY) { if (!this._isOpenType()) { console.log( - 'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts with glyph data are supported. Make sure to set the font using textFont() before drawing text.' + 'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported. Make sure to set the font using textFont() before drawing text.' ); return p; }