Example
// Learning Processing
// Daniel Shiffman
// http://www.learningprocessing.com

// Example 17-1: Simple displaying text

// Step 2: Declare PFont variable
PFont f;  

void setup() {
  size(200,200);
  
  // Step 3: Load Font
  f = loadFont( "ArialMT-16.vlw" ); 
} 

void draw() {
  background(255);
  textFont(f,16); // Step 4: Specify font to be used
  fill(0);        // Step 5: Specify font color
  
  // Step 6: Display Text
  text ( "Mmmmm ... Strings ..." ,10,100); 
  
}
  • Lds2007

    Hum…
    Where is ArialMT-16.vlw?
    Which folder?

  • Anonymous

    It is in the “data” folder of the sketch. However, I would recommend using createFont() instead, i.e.

    f = createFont(“Arial”,16,true);