Posted by
Leon in
flash
Jun 4th, 2008 |
no responses
A constant worry when creating Flash files is “will my font’s look the same everywhere”? If it’s a standard font like Arial then yes, but a custom font will fail unless you embed it.
You can embed a font in your SWF file so that the font does not need to be present on the devices the SWF file eventually plays back on. To embed a font, create a font library item.
Creating a font library item also allows you to use the font as a shared library item for sharing among multiple SWF files. You must also assign the font item a linkage identifier string and a URL where the document that contains the font symbol will be posted. In this way, you can link to the font and use it in a Flash application. When you use font symbols for dynamic or input text, embed the font outline information.
After a font symbol in a Flash document has an assigned identifier string and URL, use the font symbol in another Flash document by copying the font symbol into the destination FLA file.
Create a font library item
- Open the library to add a font symbol to.
- Select New Font from the Library Panel menu.
- Enter a name for the font item in the Name text field.
- Select a font from the Font menu or enter the name of a font in the Font text field.
- (Optional) Select Bold or Italic.
- (Optional) To embed the font information as bitmap data rather than vector outline data, select the Bitmap Text option, and enter a font size in the Size text field. (Bitmap fonts cannot use anti-aliasing. You must choose Bitmap as the anti-aliasing option in the Property inspector for text that uses this font.)
Note: The Size setting applies only when you use the Bitmap Text option.
Assign an identifier string to a font library item
- Select the font item in the Library panel.
- Do one of the following:
- Select Linkage from the Library Panel menu.
- Right-click (Windows) or Control-click (Macintosh) the font symbol name in the Library panel, and select Linkage.
- Under Linkage, select Export for Runtime Sharing.
- In the Identifier text field, enter a string to identify the font item.
- In the URL text field, enter the URL of the SWF file that contains the font item.