// Letters // by REAS // Drawing letters to the screen in Processing // uses a technology developed in the mid 1990s // at the Visual Language Workshop at the MIT // Media Laboratory. It is a closed system, // but we have supplied a number of fonts // located in the "font" directory in the main // "processing" directory. We expect to change // the Processing font technology in the future. // Created 15 January 2003 void setup() { background (0); framerate(10); size(600,250); } void draw() { background (0); write(); } void write(){ // Load the font. Fonts are located within the // main Processing directory/folder and they // must be placed within the data directory // of your sketch for them to load PFont fontA = loadFont("AmericanTypewriter-48.vlw"); textFont(fontA, 48); //textAlign(LEFT); //textAlign(CENTER); textAlign(RIGHT); // Set the gray value of the letters fill(255); // Set the left and top margin int margin = 6; int gap = 30; translate(margin*1.5, margin*2); // Create a matrix of letterforms int counter = 0; for(int i=0; i= 26) { counter = 0; } } } // ART char letter2; char letter3; char letter4; letter2 = char(65); letter3 = char(82); letter4 = char(84); // IS char letter5; char letter6; letter5 = char(73); letter6 = char(83); // THEFT char letter9; char letter10; char letter11; letter9 = char(72); letter10 = char(69); letter11 = char(70); for (int i=0; i<12; i++){ if(letter2 == 'A' || letter3 == 'R' || letter4 == 'T') { fill(random(225)+30); } else { fill(204, 204, 0); } if(letter5 == 'I' || letter6 == 'S') { fill(random(285)-30); } else { fill(194, 163, 0); } if(letter9 == 'H' || letter10 == 'E' || letter11 == 'F') { fill(random(205)+50); } else { fill(204, 234, 0); } // Draw the letters to the screen text(letter2, 350, 220); text(letter3, 375, 225); text(letter4, 400, 220); text(letter5, 420, 220); text(letter6, 445, 225); text(letter4, 475, 223); text(letter9, 500, 226); text(letter10, 525, 228); text(letter11, 550, 224); text(letter4, 575, 225); } }