AS3 Pitfalls – Missing Font Outlines

PROBLEM: Bolded or italicized text doesn’t appear in my dynamic text box, even though i’ve included the font outlines.

SOLUTION: This is a pitfall that’s existed in many versions of Flash, and it doesn’t necessarily have to do with your code. Flash treats bolded and italicized letters as separate outlines. If you have a a chunk of dynamic text, and have used htmltext or style sheets to bold and italicize certain words, you need to make sure the entire italicized font and the entire bolded font are included in your project.

One fast, lo-fi way to do this is to create two more dynamic text fields and include the bolded and italicized outlines, one set of outlines on each field. Throw those text fields off the stage, making sure they exist on a frame on or before the frame that holds your important dynamic field – this way, you can be sure the font outlines are loaded into memory. If your fonts show up the way you expected, you can work out a more elegant solution.

Leave a Reply

Your email address will not be published. Required fields are marked *