首页 >  Term: font symbol
font symbol

Beginning with Flash Professional CS5, Flash automatically embeds all characters used by any text objects that contain text. By creating an embedded font symbol, you can enable text objects in your project to use additional characters. This is helpful when users will be inputting text into fields at runtime or when you'll be editing text on the fly with ActionScript.

Embedded fonts are not necessary for text objects that have their antialias property set to the Use Device Fonts option. You can specify which fonts you want to embed in your FLA file, and Flash embeds the fonts when you publish a SWF file.

There are three common situations when embedding fonts is recommended to ensure correct text appearance in a SWF file:

  • When creating text objects in your FLA file that are integral to a design that requires consistent text appearance
  • When generating text dynamically with ActionScript in your FLA file (when you create dynamic text with ActionScript, you must specify in ActionScript which font to use)
  • When your SWF file contains text objects and may be loaded by another SWF file that does not have the required fonts embedded

The Font Embedding dialog box allows you to manage all embedded fonts in one place. Using it, you can create font symbols for each embedded font. Select custom ranges of embedded characters for a font as well as predefined ranges. You can work with both Text Layout Framework (TLF) text and Classic text in the same file and use embedded fonts with each.

Continue to work with Flash CS4 and earlier FLA files that contain fonts embedded with the older method that associated the embedded characters with a specific text object. When you open an older FLA file, Flash CS5 and later will allow you to edit these older embedded fonts with the Font Embedding dialog box.

To embed characters from a font in a SWF file, follow these steps:

  1. Open the Font Embedding dialog box (Text > Font Embedding).
  2. If your font is not already selected in the Font Embedding dialog box, click the Add (+) button to add a new embedded font to your FLA file. When you open the Font Embedding dialog box from the Library or the Text Property inspector, a font item appears automatically in the dialog box.
  3. In the Options tab, select the Family and Style of the font you want to embed.
  4. In the Character Ranges section, select the character ranges you want to embed. The more characters you embed, the larger the file size of your published SWF file
  5. If you want to embed additional specific characters, enter them in the "Also include these characters" field.
  6. To enable the embedded font symbol to be accessed with ActionScript code, select Export for ActionScript in the ActionScript tab.
  7. If you selected Export for ActionScript, select an outline format also. For TLF text containers, select TLF (DF4) as the Outline Format. For Classic text containers, select Classic (DF3).
Note: You must create separate embedded font symbols for use in TLF and Classic text containers. The TLF (DF4) outline format is not available for PostScript Type 1 fonts. TLF (DF4) requires Flash Player version 10 or later.

If you want to use the font symbol as a shared asset, select options in the Sharing section of the ActionScript tab. For more information about using shared assets, see Sharing library assets in the Flash documentation.

0 0

创建者

  • Rogerwk
  •  (Bronze) 112 分数
  • 100% positive feedback
© 2024 CSOFT International, Ltd.