The example has embedAsCFF: true, so those fonts won’t work with TextField (just TextLine).
For more details on embedding, there is an embedded fonts post on my blog.
Flex SDK Team
Adobe System, Inc.
Thanks for the link but honestly about halfway through it all started going over my head (I'm no expert at this stuff yet). What I understand (I think) is that Font.registerFont() is being called by Flex when I embed a font via css/ttf files and then choose to have them compiled into SWFs and loaded by StyleManager. I don't really mind the SWFs not unloading since we only use two different fonts in our app, I just don't want to have to embed them twice (once in Flex and once in Actionscript). The fact that I have to embed as CFF for spark components, which won't work with my AS3 TextField components, makes me think that I have no other options but to embed two times. So even if I do need to do that in my CSS, how would I actually assign the registered fonts that the StyleManager loaded to the Textfields in my other components? Would it be part of a TextFormat object assigned to the text field like how you usually do it in AS3? Thanks for your help.
1 person found this helpful
Yes, if you need to use Spark components in the main SWF and TextField in the sub swf then you have to embed both versions of the font. Once registered, the font name is used in the TextFormat for the TextFields and it should just work.
Actually they are in the same SWF, one is just a pure actionscript class that is added to the main application. However it turns out that I no longer need to use text fields and can instead use spark labels so all of this is moot. Thanks for your help though, I learned a lot going through this exercise.