- Text in dynamic/input text field not displayed.
- Text missing after scale, screw, or rotate the text field.
- Text problem when masking or tweening.
Flash does not embed the entire font with all the characters. By default, only used glyphs embeded for static text fields, and no glyphs embeded for dynamic and input text field.
Embed the required font glyphs to your Flash document.
Firstly, make sure that the fonts that you want to embed has already been installed in your local machine.
To embed a font thru Property Inspector
- Create a dynamic text field on your stage
- From the Property Inspector select ‘Embed…’ (or ‘character’ for older version of Flash software).
- Choose the character ranges that you want to embed.
- Press OK
Note: Make sure that you choose all the range of characters that may appear in the textfield
For Flash 5, you can embed the font thru the Text Options panel (Window>Panel>Character).
To embed a font in ActionScript
- Emmbed the font to the library of your Flash document
– Open Library (Ctrl-L).
– Click on the Library options button, select New Font.
– In Font Symbol Properties dialog, select font, style, and size, set the value for name (e.g. my_font), then press OK.
- Set linkage for the font symbol
– Right click on the font symbol in Library, select Linkage…
– In Linkage Properties dialog, enable the Export for Actionscript option, then press OK.
- Create text field
– Create a dynamic or input text field on your stage
– In Property Inspector, set the font (my_font*), and set the style and size same value with step 1
– Set the instance name for the text field, (e.g. my_txt)
- Add ActionScript
– In Action Panel, add the following script
With the font embeded in your Flash document, you can dynamically set the font style, format, rotation, alpha, & etc. and allows mask, tween, and skew of a dynamic text field while gives a consistent, predictable viewing of fonts in your swf. However, embeding a font will increase your SWF file size.
Font embedding in other software
Flash is not the only software which require manual embedding font into published document.
In Microsoft PowerPoint, we need to embed fonts in Save As dialog, Save Options,
choose Embed TrueType fonts for PowerPoint 2003 or below, or choose Embed fonts in the file for PowerPoint 2007.
For web application, we can embed font by converting the font to Portable Font Resources (.pfr) and Embeddable Open Type (.eot) format, and then using <link> and <style> html tag to embed the font.
LiveDocs: Embedding fonts
Flash Quick Start: Embedding fonts