p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

There is a link on the reference page for loadFont() which links to a website which supplies fonts for free but the font linked to does not appear to work

Open allhailtheraccoon opened this issue 1 year ago • 1 comments

Most appropriate sections of the p5.js website?

Reference

What is your operating system?

Windows

Web browser and version

Chrome, 120.0.6099.216

Actual Behavior

The sketch when run with the font linked to in the reference section on loadFont() will say "loading" in black text against a dark grey background This is a not working version: https://editor.p5js.org/pleasantmadscientist/sketches/f0qwDSno6

Expected Behavior

This is a working version: https://editor.p5js.org/pleasantmadscientist/sketches/_wP7xXBCx

Steps to reproduce

It should be reproducible by simply going here: https://p5js.org/reference/#/p5/loadFont and going to the link they have which goes to here: https://www.fontsquirrel.com/fonts/inconsolata then copy/pasting the code listed in the last example here: https://p5js.org/reference/#/p5/text into the p5.js editor and clicking run. I would recommend changing the source of the font to here: https://github.com/googlefonts/Inconsolata/blob/main/fonts/otf/Inconsolata-Black.otf and changing the code used on the last example (possibly some of the other examples too when appropriate) of the text reference page to look something like this: "font = loadFont('assets/Inconsolata-Black-.otf');"

Would you like to work on the issue?

I would prefer if someone more competent than I am works on this, since it's likely I'd mess it up. Thank Yoooooou! :)

allhailtheraccoon avatar Jan 28 '24 20:01 allhailtheraccoon