Strange. When I link to the library project using "Merged into code" it works, but when linking to it as an RSL it throws the following error when running the app:
VerifyError: Error #1014: Class mx.core::FontAsset could not be found. Google doesn't have a whole lot to say on the issue. I get this error even if I compile my font library project using the 3.3 SDK. Aaron --- In flexcoders@yahoogroups.com, "aaronius9er9er" <aaronius...@...> wrote: > > Nevermind, that's related to my code. More testing to come... > > --- In flexcoders@yahoogroups.com, "aaronius9er9er" <aaronius9er@> wrote: > > > > Thanks for the response. I created a library project with an EmbeddedFonts > > class compiled using the Flex 4 sdk. I then linked to the library and made > > sure the app was referencing the class: > > > > protected var fontsLinkage:EmbeddedFonts; > > > > but then I get the following error when attempting to run the app: > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > > _tlftester_mx_managers_systemmana...@139860b1 to > > flashx.textLayout.compose.ISWFContext. > > at > > TLFTester/fontLoadedHandler()[C:\Development\TLF\TLFTester\src\TLFTester.mxml:52] > > at > > TLFTester/application1_creationCompleteHandler()[C:\Development\TLF\TLFTester\src\TLFTester.mxml:25] > > at > > TLFTester/___TLFTester_Application1_creationComplete()[C:\Development\TLF\TLFTester\src\TLFTester.mxml:3] > > at flash.events::EventDispatcher/dispatchEventFunction() > > at flash.events::EventDispatcher/dispatchEvent() > > at > > mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9308] > > at mx.core::UIComponent/set > > initialized()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169] > > at > > mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] > > at Function/http://adobe.com/AS3/2006/builtin::apply() > > at > > mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8633] > > at > > mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8573] > > > > I would assume it's due to a difference in SDKs. You didn't run into the > > same issue? > > > > Aaron > > > > > > --- In flexcoders@yahoogroups.com, gabriel montagné <gabriel@> wrote: > > > > > > Hello Aaron, > > > > > > On 06/05/2010, aaronius9er9er <aaronius9er@> wrote: > > > > > > > > We have an app built in Flex 3.3. We've pulled the text layout > > > > framework > > > > swc from Flex 4 to use in our app. We now need to load fonts > > > > dynamically at > > > > runtime to use within our text flow. In my understanding, in order to > > > > > > We've also had to use the TLF with CFF fonts in a Flex 3.* app... we > > > didn't > > > have to load them at runtime but we compiled a swc with them and linked > > > that on > > > the main app. > > > > > > Perhaps you could do something like that with a RSL if you need to load > > > them > > > dynamically. > > > > > > But, most importantly, for the fonts to be linked you don't really need > > > the swf > > > compiled with the new sdk to be a full flex app. In our case it was > > > just a > > > plain class with the fonts embedded: > > > > > > package uk.co.razorfish.fonts > > > { > > > > > > /** > > > * This class embedds the fonts needed for the TLF which is used for the > > > ... > > > */ > > > public class EmbeddedFonts > > > { > > > > > > [Embed( > > > source="tt1047m_.ttf", > > > fontFamily="Industrial736 BT", > > > fontStyle="regular", > > > cff="true", > > > advancedAntiAliasing="true", > > > unicodeRange="U+0020-007F, U+00A0-00FF, U+2010-201F, > > > U+2032-2037, U+2039-203A, U+20A0-20B5" > > > )] > > > public static const INDUSTRIAL_ROMAN:Class; > > > > > > [Embed( > > > source="tt1048m_.ttf", > > > fontFamily="Industrial736 BT", > > > fontStyle="italic", > > > cff="true", > > > advancedAntiAliasing="t > > > > > > ... etc. > > > > > > Because we needed to load them up front, on the main app, we just linked > > > that > > > class, > > > > > > import uk.co.razorfish.fonts.EmbeddedFonts; EmbeddedFonts; > > > > > > And that did the job. > > > > > > HTH, > > > Gabriel > > > > > > -- > > > gabriel montagné láscaris comneno > > > http://rojored.com > > > +44 (0) 7500 709 209 > > > > > >