// display the message, first as a single string, // and then one character at a time. // both should be centered on the screen size(600,300); String msg = "This is a test"; textSize(80); fill(0); textAlign(CENTER, CENTER); text(msg, width/2, 100); // first compute total width of characters float total = 0; for (int k=0; k < msg.length(); k++) { total += textWidth(msg.charAt(k)); } // now start drawing the characters textAlign(LEFT, CENTER); float x=width/2 - total/2; for (int k=0; k < msg.length(); k++) { text(msg.charAt(k), x, 200); x += textWidth(msg.charAt(k)); }