a port of the Processing Visualization Language
Class PFont
Name

list()

Processing.js Behavior Font support for the Canvas element varies across browsers. FireFox currently has the best support, but still uses a pre-defined set of fonts. (Documentation to follow soon.) Good alternatives to the browser's Canvas-font functions are available: such as the Glyph method. See also: Canvas Text, BurntToys Bauhaus.

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

Examples
size(200, 200);
String[] fontList = PFont.list();
println(fontList);
Description

Gets a list of the fonts installed on the system. The data is returned as a String array. This list provides the names of each font for input into createFont(), which allows Processing to dynamically format fonts. This function is meant as a tool for programming local applications and is not recommended for use in applets.

Syntax
font.list()

Parameters
font any variable of type PFont
Returns String[]
Usage Web & Application

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

Creative Commons License
Fork me on GitHub