Accessibility

TechNote

Using font symbols

Font symbols are fonts that reside in a shared library. A font symbol can be used in a Macromedia Flash movie without being embedded in the movie. Instead, it resides in another movie on the hosting machine, as with other shared library items. This can reduce file size and download time for multiple files that use the same font. An understanding of using shared libraries is important before attempting to use shared fonts. Shared libraries are discussed in more depth in Using shared libraries (TechNote 14767).

Note: Shared font symbols are meant to be used for playback only, and not for authoring purposes. That is, in authoring mode, a text field that uses a shared font will display properly only on systems that have that font installed.

How to create a shared font:
  1. Open a new Macromedia Flash file (File> New).
  2. Open the Library window by choosing Window> Library.
  3. From the Options menu in the upper right corner of the Library window choose New Font. This opens the Font Symbol Properties dialog.
  4. In the dialog, choose a font from the Font popup menu and enter a descriptive name for the font in the text field. Select the Bold or Italic to include those font styles for the chosen font.
  5. Choose OK. The font symbol appears in the Library window.
  6. Select the font symbol in the Library window and then choose Linkage from the Library's Options menu. This opens the Symbol Linkage Properties dialog.
  7. Macromedia Flash 5:
    Under Linkage in the Symbol Linkage Properties dialog box select Export This Symbol.

    Macromedia Flash MX:
    Under Linkage in the Symbol Linkage Properties dialog box select Export for ActionScript.
  8. Enter an identifier string in the text box for this font symbol.


    Note: Any identifier string will do, but it's a good idea to follow the same naming conventions as for other Macromedia Flash objects. For more information refer to Naming Strategies for Flash (TechNote 14727).
  9. Choose OK.
  10. Save the file as fontLibrary.fla
  11. Publish or Export the file as fontLibrary.swf
  12. Close fontLibrary.fla.
Using the shared font in another movie:
  1. Open a new Macromedia Flash file (File> New).
  2. Flash 5:
    Choose File> Open As Shared Library and choosefontLibrary.fla to open the Library for that file.

    Flash MX:
    Choose File> Open As Library and choosefontLibrary.fla to open the Library for that file.

    Note: If the Library window does not appear at this point, make sure that fontLibrary.fla is not still open in the background. If it is, closefontLibrary.fla and repeat this step.
  3. To import the shared font to the current movie, open the current movie's Library (Window> Library). Drag the Font symbol from the shared Library window to the current movie's Library.
  4. Use the Text tool create a text box on the stage.

    Note: You may choose Static, Dynamic, or Input Text for the "Text Type".
  5. From the Font popup menu in the Character panel (Window> Panels> Character) locate the imported font. The font's name will be that which was specified in step 4, and an asterisk (*) will appear next to the font name, as shown below.
  6. Save the movie as main.fla to the same directory which contains fontLibrary.fla andfontLibrary.swf.
  7. Preview the movie by choosing Control> Test Movie or by choosing the F12 key to preview the file in the browser.
Using shared fonts over the Web

In order for main.swf to access the file containing the shared font, both main.swf andfontLibrary.swf must be posted to a Web server. The path relationship between the two files must remain the same on the server as during the authoring process. For more information on deploying shared assets to a Web server and relinking shared assets if the path relationship between files should change, please refer to Using shared libraries (TechNote 14767).

Note: On the Macintosh, if a shared font file uses a Postscript Type 1 font, exporting the SWF will produce the error message "Some characters could not be converted to outlines because an appropriate outline font is not available." However, this error message is erroneous. Click OK on the error dialog and the SWF export will continue intact.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_14786
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected: