/* 6.914, Example 2.4 printing text to the output window First, use the Tools/Create Font... command to select a font face and size. The .vlw file you create will be saved to your sketches data folder. Then, use a few commands to get text printed to the window. The major ones are 0) PFont myFont = loadFont("Fontname.vlw"); 1) textFont(myFont); // this tells your program to put text in that font until further notice (or, alternatively, textFont(myFont, myFontSize); if you want to change the font size of your PFont.) 2) text("Text to print here", xCoord, yCoord); You can use the fill command to give your text color. Using stroke will not have any effect. Font names come from the "Create Font..." choice on the Tools menu. */ PFont myFont1 = createFont("Tahoma", 30); PFont myFont2 = createFont("ComicSansMS", 30); void setup(){ size(300, 300); noLoop(); } void draw(){ background(255, 0, 0); fill(255); textFont(myFont2); text("string1", 100, 200); fill(0); textFont(myFont2); text("string2", 200, 200); }