I´ve been trying to find the holy grail of Shared Fonts but with no success.
I then decided I just wanted it to work.
I´ve have done this way:
- Packing all the fonts I´m using in my application in a separate SWF,
setting them to "Export For Runtime Sharing" and also to "Export for AS".
- Loading this SWF in the app´s main prealoader in a hidden movieclip
offstage;
- In the subsequent loaded SWF´s that would use the fonts, I´ve added a
"SharePoint" on movieclip imported from the shared library in the first
frame.
- Created a TextFormat object for each of the font´s and applied it to the
TextFields.
However, I´ve found too many inconsistencies while I was implementing it.
I´ve found that I would have to set both a TextFormat object and also
"setStyle('fontFamily','fontName'); setStyle('embedFonts',true)" to the
TextField or otherwise it wouldn´t work. If I only set the TextFormat
object, it doesn´t work and if I only set the style, it doesn´t work
either... why!?
I´ve noted that sometimes the initial text is shown, but when I try to
modify it through code, it either doesn´t changes or goes blank.
In sum, I´ve been through a hard time trying to get this shared font thing
to work with TextFields. With v2 components I got it to work by setting it´s
style ( "setStyle('fontFamily','fontName'); setStyle('embedFonts',true)") I
assume the v2 framework deals with the TextFormat issue, but with regular
TextFields... it´s a hell confusing...
I´m confused and I need some enlightment! Any help would be much
appreciated!
Marcelo.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com