I posted a nifty method on how to embed a font using a SWF created in Flash CS3, back in January:
Here is an excerpt:
For anyone else wondering how to do this, here's a brief outline on creating a SWF in Flash CS3 containing fonts you can then embed in Flex:
In Flash, put a "dynamic text" box on the stage. I type the font name in the box to remind me which font I'm working with e.g. Verdana or Verdana Bold.
Use one "dynamic text" box for each of your font's weight and styles (regular, bold, italic, bold italic, etc.).
Click the embed button for EACH text box...choose the characters you need for EACH text box (uppercase, lowercase, numerals, punctuation, etc.).
Check your publish settings, then publish to SWF.
Add SWF to your project.
Set up a CSS style sheet which embeds the fonts. Example:
Make sure the fontFamily name matches the name of the font to avoid any compiler errors. The font name may differ somewhat from the name shown in some applications. In Windows you can open the font directly from the font folder by clicking it and get the exact font name.
Yes, thank you very much. Seems odd to have to state the font twice just to be able to have normal and bold, but whatever. Flex/Flash are just full of little oddities. Like stating the type of a var 2 times in some cases. Like: var grid:DataGrid = new DataGrid
But thank you very much!
Yes, you do have to embed each weight and style separately. I think Flex requires this so that you can embed only what you need, instead of the entire font file with all its weights and styles.