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 dialogue 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 dialogue box.
To embed characters from a font in a SWF file, follow these steps:
- Open the Font Embedding dialogue box (Text > Font Embedding).
- If your font is not already selected in the Font Embedding dialogue box, click the Add (+) button to add a new embedded font to your FLA file. When you open the Font Embedding dialogue box from the Library or the Text Property inspector, a font item appears automatically in the dialogue box.
- In the Options tab, select the Family and Style of the font you want to embed.
- 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
- If you want to embed additional specific characters, enter them in the "Also include these characters" field.
- To enable the embedded font symbol to be accessed with ActionScript code, select Export for ActionScript in the ActionScript tab.
- 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).
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.
- Jenis Kata: noun
- Industri / Domain: Perangkat lunak
- Kategori: Perangkat lunak (yang biasanya digunakan) untuk mendesain
- Company: Adobe
Penulis
- Harry8L
- 100% positive feedback
(London, United Kingdom)