We are about to switch to a new forum software. Until then we have removed the registration on this forum.
var myFont;
function preLoad() { myFont = loadFont('assets/DroidSansMono.ttf'); }
function setup() { textFont(myFont); }
why does this give me the following error: "25722: Uncaught Error: null font passed to textFont"?
Answers
https://forum.Processing.org/two/discussion/16028/font-loading-issue
I'm not sure that's the same problem though ... I get the error already in the p5 editor. It's like the myFont variable is null and therefore causes the problem?
also loadFont() does not become pink in the editor, like the other p5 functions, is that normal?
https://forum.Processing.org/two/discussion/15473/readme-how-to-format-code-and-text
I only got this online example w/ loadFont(): L-)
http://GoToLoop.GitHub.io/p5.js/
https://GitHub.com/GoToLoop/p5.js/blob/gh-pages/index.html
But I believe the bug is merely your mistyping of preload() callback: :-B
http://p5js.org/reference/#/p5/preload
d'oh ... yes! thanks man :D