It might be that you're not passing a value to registerFont.
Oh shoot, actually I am. It's a type.
I am actually passing it
I don't think you are setting this up correctly. How is the font.swf
embedding its fonts? Also, registerFont takes a font class not an instance
of the font, IIRC.
Yes I understand that. SWF is set up correctly, since I can get the font loaded in the same application domain with the swf file.
This definitely is coming from two files being in the different application domain.
Sent from my iPad
Well, I don't see any use of a custom LoaderContext, so the SWF should be
loaded as a child swf, and the definitions of Font should be shared. Are
you saying the same code to register fonts runs in the font SWF?
It would work if I did:
(e.target as LoaderInfo).applicationDomain.getDefinition("flash.text.Font").registerFonr(FontLib);
However, again, because the FontLib is being registered to the Font class from different Application Domain, the FontLib would not be accessible for TextFields in the main domain.
The Font class in a child applicationDomain is the same as in the parent
applicationDomain, so I'm not understanding your configuration. In fact,
Font should be shareable even across sibling applicationDomains because it
is a Flash Player class.
A font registered in a child applicationdomain should be usable in other
What happens if you add code to the font library to register in its