View comments | RSS feed

Embedding characters

If you're working with embedded fonts and know exactly what characters you need, you can reduce file size by embedding only the characters that you need instead of including additional, unused font outlines. To embed certain characters within a text field and not embed a whole character set, use the Character Embedding dialog box to specify which specific characters you want to embed.

To embed specific characters for use in a text field:

  1. Create a new Flash document and save it as charembed.fla.
  2. Using the Text tool, create a text field on the Stage and set the text field's text type to either dynamic or input.
  3. With the text field still selected on the Stage, click Embed in the Property inspector to open the Character Embedding dialog box.

    The Character Embedding dialog box lets you set which character sets will embed in the Flash document (as well as how many glyphs per character set), specify specific characters to embed, and tells you the total number of glyphs being embedded for this text field.

  4. Type the string hello world into the Include these characters text box.

    The dialog box tells you that a total of 8 glyphs will be embedded for this text field. Even though the string "hello world" contains 11 characters, Flash only embeds unique glyphs, so the letters l and o are embedded once instead of multiple times.

  5. Click OK to apply the changes and return to your document.
  6. Using the Text tool, create a new text field on the Stage.
  7. Set the text field's text type to dynamic in the Property inspector.
  8. Type the string hello world into the text field on the Stage.
  9. Click Embed in the Property inspector to open the Character Embedding dialog box again.
  10. Click Auto Fill to automatically populate the Include These Characters text box.

    You will see the string "helo wrd". Instead of having to tell Flash which characters you want to include, Flash can determine all unique characters in the specified text field for you.

    TIP

     

    Flash can determine characters to embed automatically only if the text field contains text on the Stage. If the text field is populated by using ActionScript, you must specify which characters you want to embed for the text field.

  11. Click OK.

Flash CS3


Comments


dummkopf99 said on Jun 17, 2007 at 8:47 AM :
Is it possible to do this using actionscript alone? If so, how?
No screen name said on Jun 20, 2007 at 3:14 PM :
I would like to know how to do this with ActionScript as well. Usually I find that creating objects with AS is much more powerful than using the GUI. I'd be very surprised if there is no way to limit your font using AS.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000892.html