You shouldn't need to unregister.  We use weak references.  I'm guessing that 
something else is preventing the module from unloading.  Try using the profiler 
and see what is holding onto the module

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: Thursday, May 21, 2009 8:13 PM
To: [email protected]
Subject: [flexcoders] Re: Embedding fonts dynamically...





Yes, I'm left the applicationDomain parameter to default.

i'm jut wondering is there any information to do what's mentioned below.

Using Flex to create the font swfs and is it possible to unregister font using 
the embeededFontregistry.

Thanks, you help is much appreciated

--- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex 
Harui <aha...@...> wrote:
>
> Not if the fonts get registered with registerFont. If you use Flex to create 
> the font swfs you shouldn't need to call registerFont, but they may not show 
> up in enumerateFonts. However they should get registered with the 
> embeddedFontRegistry and work properly.
>
> I assume you showed the exact call to loadStyleDeclarations and aren't 
> messing with the applicationDomain parameter?
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On 
> Behalf Of rid_b80
> Sent: Thursday, May 21, 2009 1:26 AM
> To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Re: Embedding fonts dynamically...
>
>
>
>
>
> 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]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
>  Alex Harui <aharui@> 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:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> >  
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> >  On Behalf Of rid_b80
> > Sent: Wednesday, May 20, 2009 7:04 PM
> > To: 
> > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > 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><mailto:flexcoders%40yahoogroups.com><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:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > >  
> > > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> > >  On Behalf Of tchredeemed
> > > Sent: Thursday, 4 December 2008 7:37 a.m.
> > > To: 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><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