That's a really good idea that I didn't think of. I'll try that
tonight when I get home and see. Maybe I'll just give it 5 seconds and
see what happens.

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Load is asynchronous so there is no guarantee that FontHolder is loaed
> by the time you run inited()
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of joshuajnoble
> Sent: Tuesday, May 01, 2007 10:44 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Loading Fonts at runtime on OSX?
> 
>  
> 
> 
> Ha, well ok. The vomit is
> 
> paramter font cannot be null
> 
> for Font.registerFont. The FontHolder class looks like so:
> 
> package
> {
> import flash.display.Sprite
> 
> public class FontHolder extends Sprite
> {
> [Embed(fontFamily="ArialBlack",
> source="C://WINDOWS//Fonts//ariblk.TTF <C://WINDOWS/Fonts/ariblk.TTF>
> ")]
> public static var ArialBlack:Class;
> }
> }
> 
> So I'm really not sure what it's all about because it works fine
> loading accessing the font on a PC with the exact same code. This code
> to be exact:
> 
> public class FontLoadingTest extends Sprite
> {
> public function FontLoadingTest()
> {
> var ld:Loader = new Loader();
> ld.contentLoaderInfo.addEventListener(Event.INIT, inited);
> ld.load(new URLRequest("FontHolder.swf"));
> }
> 
> private function inited(event:Event):void
> {
> var t:Class =
> event.target.applicationDomain.getDefinition("FontHolder") as Class;
> Font.registerFont(t.ArialBlack);
> var tf:TextField = new TextField();
> tf.defaultTextFormat = new TextFormat("ArialBlack", 12, 0);
> tf.embedFonts = true;
> tf.rotation = 15; // to demonstrate the embed worked
> tf.text = "blah blah blahnblah blah blahnblah blah blah ";
> addChild(tf);
> }
> }
> 
> Any ideas, humorous or otherwise?
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , Bjorn Schultheiss
> <bjorn.schultheiss@> wrote:
> >
> > Depends what you ate or drank the night before,
> > I mean the smell is probably interesting than what it looks like.
> > 
> > What it tastes like is a whole other story ;)
> > 
> > Just kidding, Alex...
> > 
> > 
> > On 01/05/2007, at 4:24 PM, Alex Harui wrote:
> > 
> > >
> > > What does the vomit look like? And what does the FontHolder class 
> > > look like?
> > >
> > >
> > >
> > > From: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>  
> > > [mailto:flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> ] On Behalf Of joshuajnoble
> > > Sent: Monday, April 30, 2007 6:29 PM
> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> 
> > > Subject: [flexcoders] Loading Fonts at runtime on OSX?
> > >
> > >
> > >
> > > Wondering if anyone else has run into this: I'm loading fonts at
> > > runtime via a swf that has a font embedded in it. I can't get the
> font
> > > embedded on my OSX machine, so I compile the font swf on my pc and
> > > then bring it over to my OSX machine and try to load it into the
> > > application swf like so:
> > >
> > > private function fontSWFLoaded(event:Event):void
> > > {
> > > var holder:Class =
> > > event.target.applicationDomain.getDefinition("FontHolder") as Class;
> > > Font.registerFont( holder.Kartika );
> > > videoOverlay.overlay.fontLoaded();
> > > }
> > >
> > > It vomits every time on Font.registerFont. This exact same code
> works
> > > fine on my PC. Now, I don't have Kartika
> > > installed on my mac, which could be part of the problem I suppose so
> > > my next is going to be trying with Arial, but does anyone have any 
> > > ideas?
> > >
> > >
> > >
> > >
> >
>


Reply via email to