a port of the Processing Visualization Language
Name

loadFont()

Processing.js Behavior Font support for the Canvas element varies across browsers. See Canvas Text, BurntToys Bauhaus.

Please use the follwoing demos to learn how fonts can be rendered in Firefox with Processing.js: Letters, Words, width()

Examples
example pic
PFont font;
font = loadFont("FFScala.ttf"); 
textFont(font, 32); 
text("word", 15, 50);
Description Loads a font into a variable of type PFont. To load correctly, fonts must be located in the current directory of the sketch. Instead of using loadFont, you should be using createFont().
Syntax
loadFont(fontname)
Parameters
fontname string: name of the font to load
Usage Web & Application
Related PFont
textFont()
text()
createFont()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub