Changing Font Style

How do I change the font style of a textField? Doing

text.font = “styleName”

doesn’t seem to work. [import]uid: 152084 topic_id: 27534 reply_id: 327534[/import]