To answer Cedric, I'm using loadFont rather than createFont because I'm pulling random typefaces from a big library folder of over 100 vlw font files. To create all fonts every time I run the program would be inefficient.
To answer PhiLho, here's my (probably dirty) code for generating the type:
Code:
void mousePressed() {
PFont TypeNameFont;
//TypeNameFont = loadFont("Interstate-Regular-9.vlw");
TypeNameFont = loadFont("AkzidenzGrotesk-Roman-10.vlw"); //font for displaying letter font type
// Set the left and top margin and kern factor spacing between letters
int margin = 30;
int gap = -2; //determine gap between letters
translate(margin, 0);
float kernFactor = 0;
println("Generating wordmark. Please wait!");
for(int j=0; j< name.length(); j++){
fill(fontColor); //reset back to fontColor from Interface color
int ch = int(random(0,fontList.length));
//println(qArray[j]+". "+fontList[ch]); //displays complete font file name
//remove file extension from font name
String thisString = fontList[ch];
String name = thisString;
int dotPos = thisString.lastIndexOf("-");
if (dotPos > 0)
name = thisString.substring(0, dotPos);
println(qArray[j]+". "+name); // displays font file name without extension
myfont = loadFont(fontList[ch]); //loadfont from data folder vlw font list
textFont(myfont, fontSize);
text(qArray[j], margin+kernFactor, mouseY);
kernFactor = kernFactor+gap+textWidth(qArray[j]); //update kern factor for next letter
//interface elements, font name listing
fill(TypeNameFontColor);
textFont(TypeNameFont, 10); //size of tiny letter font type
//String letterFont = (qArray[j]+" "+name); //name is font name with no extension, this shows Q and font name with space between
String letterFont = (qArray[j]+" ");
String fontName = (name);
text(letterFont, 765, mouseY-96-12*(1-j)); //positions letter name "Q" "U" "I" etc in column to right of wordmark
text(name, 782, mouseY-96-12*(1-j)); //positions font name listing to right of letter name in column
}
Thanks again, any insights would be very helpful!
Best,
Greg