We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi guys, i am making a programm in which you can change the font, fontsize, color etc. dynamically based on the punctuation you give at the end of the sentence. for example:
if (myText.endsWith("!") == true) {
fill(255,0,0);
font = createFont("HelveticaNeueLTStd-Bd.ttf",100);
}
else if (myText.endsWith("!!") == true) {
fill(0,255,0);
font = createFont("HelveticaNeueLTStd-Bd.ttf",120);
}
else if (myText.endsWith("!!!") == true) {
fill(0,0,255);
font = createFont("HelveticaNeueLTStd-Bd.ttf",150);
}
but the programm doesn`t make a difference between "!" and "!!" or "!!!". can somebody help me out and say why?
Answers
Check "!!!" before the others:
yeah thank you for the tip! youre great! sorry for the late respond :D