O'Reilly logo

Flash 8 Cookbook by Joey Lott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.14. Ensuring that Text Displays in the Original Font

Problem

You want to make sure that your movie’s text will display in the correct font even if the user does not have that font installed on her system.

Solution

Embed the font. Or, if you want to continue to use device fonts, choose one of the font groups from the font menu (text fields) or set the fontFamily style (text area and text input) to one of the font groups. This latter option does not guarantee that Flash will use the exact font you use during authoring time, but it does guarantee that Flash will substitute at least a similar font.

Discussion

By default, Flash uses device fonts for dynamic and input text fields as well as for text input and text area components. If you don’t use a font that the user has installed on her computer, Flash will substitute the default font. In many cases, this is not something that you want to have happen. So you have two options:

  • Embed the font. This approach guarantees that the exact font will be used every time the movie is played, regardless of the fonts available on the user’s computer. The downside is an increase in file size. However, each font is embedded only once, even if it is used in multiple text fields, text inputs, and/or text areas.

  • Continue using device fonts, but select one of the three font groups (_sans, _serif, or _typewriter) instead of a specific font. These font groups allow you to tell Flash what style of font to use. The benefit is that there is no increase in file size ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required