I guess what i'm trying to do is this

when i call like

StyleManager.loadStyleDeclarations("css/font1.swf");
StyleManager.loadStyleDeclarations("css/font2.swf");

and i call 

var fontList:array = Font.enumerateFonts(false);

my fontList will be something like (font1,font2)

Then when i go

StyleManager.unloadStyleDeclarations("css/font1.swf");
StyleManager.unloadStyleDeclarations("css/font2.swf");

StyleManager.loadStyleDeclarations("css/font3.swf");
StyleManager.loadStyleDeclarations("css/font4.swf");

then 

var fontList:array = Font.enumerateFonts(false);

my fontList is (font1,font2,font3,font4) not just (font3 and font4)

I'm just wondering if there is anyway to do that

Thanks


--- In [email protected], Alex Harui <aha...@...> wrote:
>
> It should work, but depending on which class is going to display the text, 
> you might also need to use ContextualClassFactory and/or package those 
> classes into the same modules as the fonts.  See other posts by me on 
> embedded fonts.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of rid_b80
> Sent: Wednesday, May 20, 2009 7:04 PM
> To: [email protected]
> Subject: [flexcoders] Re: Embedding fonts dynamically...
> 
> 
> 
> 
> 
> I've tried this and it doesnt seems to unload the previous fonts
> 
> Is anyone having that problem as well?
> 
> --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, 
> "Wildbore, Brendon" <B.J.Wildbore@> wrote:
> >
> > Hi,
> >
> > One way of achieving this is two have a number of different stylesheets 
> > with the embedded fonts in them.
> > Use the stylemanager class to change the stylesheet to display the font you 
> > would like.
> >
> > Eg.
> >
> > var oldStyleFile:String = "/css/basicfont.swf";
> >
> > try{
> > StyleManager.unloadStyleDeclarations(oldStyleFile);
> > }catch(err:Error){trace("error removing oldStyleFile style");}
> >
> > //add new theme
> > var newStyleFile:String = "/css/funkyfont.swf";
> >
> > try{
> > StyleManager.loadStyleDeclarations(newStyleFile);
> > }catch(err:Error){trace("error loading newStyleFile style");}
> >
> >
> > Hope this helps
> >
> >
> >
> > ________________________________
> > From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of tchredeemed
> > Sent: Thursday, 4 December 2008 7:37 a.m.
> > To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Re: Embedding fonts dynamically...
> >
> >
> > How would I do that?
> >
> > Also, do you know of any way to tell if the user has a font already,
> > and I will only embed it if they need it (don't want to load a font
> > that they already have...)
> >
>


Reply via email to