Set TextFormat

Does anybody see why this code doesn’t work? It looks identical to other code I’ve found on Kirupa.

card.createTextField("terms_txt", 1, 10, 10, 375, 40);
f = new TextFormat();
f.size = 18;
card.terms_txt.setTextFormat(f);