Section 11.2. Using Fonts


11.2. Using Fonts

The previous section of this chapter briefly alluded to issues surrounding font use in dynamic and input text elements. (Remember, although you obviously need the relevant font to edit a static text element during authoring, these text types will be converted to graphics for runtime distribution.)

There are two ways to use fonts in dynamic and input text elements. The first is to rely on fonts that you expect to be present on the end user's machine. These are referred to as device fonts. The second is to guarantee that any custom fonts will render properly on any machine by embedding the font outlines in your file.

11.2.1. Device Fonts

Device fonts are extremely useful for keeping file size low because they don't require you to embed font outlines in your file. However, this also means that you are restricted to a small list of fonts that you expect to be found on most systems.


Note: You should be sure to test your files on as many machines and platforms as possible to verify your font use and expected results. However, this is a liberal list of fonts that may be found on most modern operating systems:

To use a device font, simply select that option from the anti-aliasing menu in the Properties panel.

11.2.2. Embedding Fonts

When custom or uncommon fonts are required, or when you wish to take advantage of advanced anti-aliasing options or font switching through ActionScript, embedding font outlines is required. Here's how it works:


Note: To embed styled font outlines, such as bold and italic, style at least one character of placeholder text in each format. For example, you can routinely add a string like this:a b c dwhich contains one character in each style.

  1. Using your active instance_and_var.fla file, select one of your text elements and type a string therein in the font and styles you wish to embed.

  2. Click the Embed button in the Properties panel, with any dynamic or input text element selected. (If the option is not selectable, you may have your anti-aliasing option set to "Use device fonts.")

  3. You will see a dialog similar to the one pictured in Figure 11-5. Multiple-select any range of character outlines, or glyphs, that you wish to embed (using Shift-click for contiguous selections, or Ctrl/Cmd-click to select separated items).


    Warning: Don't embed the entire font if you don't need to, as it will contribute significantly to file size. For example, if you know you only need uppercase alpha characters for a headline, or only numbers and punctuation for dollar amounts, select only those glyphs that are needed. In fact, if you know the exact string you intend to use, you can embed only specific characters in the field at the bottom of the dialog.

  4. Save your work and test your movie.

If any characters don't display, be sure you've styled placeholder text prior to embedding, as discussed in step 1.

Figure 11-5. The Character Embedding dialog, embedding only basic characters to keep file size as low as possible




Flash 8(c) Projects for Learning Animation and Interactivity
Flash 8: Projects for Learning Animation and Interactivity (OReilly Digital Studio)
ISBN: 0596102232
EAN: 2147483647
Year: 2006
Pages: 117

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net