You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either change the sample to use the right arguments or use createFont instead of loadFont :
PFontmono;
// The font "andalemo.vlw" must be located in the // current sketch's "data" directory to load successfullymono = loadFont("andalemo.vlw");
background(0);
textFont(mono, 32);
text("word", 12, 60);
or
PFontmono;
// The font "andalemo.ttf" must be located in the // current sketch's "data" directory to load successfullymono = createFont("andalemo.ttf", 32);
background(0);
textFont(mono);
text("word", 12, 60);
The second option seems more elegant :)
The text was updated successfully, but these errors were encountered:
Issue description
The example use
loadFont
(lign 3) with a size parameter and a font of type ttf, which should be specified bytextFont
(lign 6) instead.Alternatively use
createFont
instead, which seems to have been the original intent.(Similars previous issues like #291 has been closed with no fixes so I reopened one)
URL(s) of affected page(s)
https://processing.org/reference/textFont_.html
Proposed fix
Either change the sample to use the right arguments or use createFont instead of loadFont :
or
The second option seems more elegant :)
The text was updated successfully, but these errors were encountered: