-
Changing the font of the First Name and The Second name
I’ve been trying to work out a way to type a name, and have the first name in one style and the surname in another.. I’ve tried to mash two expressions I found on-line together.. but they don’t appear to be working.. this is the error
TypeError: cannot read property ‘setFont” of Undefined
this is the expression
txt = text.sourceText.value;
splt = txt.split(” “);
str = splt[0][0].style.setFont(“ESPCircular-Bold”) + splt[0].style.setFont(“ESPCircular-Book”);
str += txt.substr(splt[0].length).toUpperCase()
could someone please cast their eyes over this and see what the problem is.. I’m getting this error message.. could it be that I’m mixing languages ?? legacy and Java ???