Search code examples
apache-flextextareaflex-spark

spark TextArea not displaying embedded fonts


I can't seem to get TextArea to render any embedded fonts in project. I've searched online and have found a couple of instances of this issue but no solutions.

I have a few fonts embedded with my app. Spark Label & the mx:TextArea (switching embedAsCFF to 'false') will display them correctly so I know they're embedded OK. I have the fontFamily value in a binding but I even tried just instantiating a new TextArea then assigning one the the embedded fonts via the fontFamily style and have had no luck. Has anyone experienced this?

/* In my CSS file  */
@font-face {
src:url("assets/fonts/UbuntuMono/UbuntuMono-Regular.ttf");
fontFamily: UbuntuMono;
embedAsCFF: true;
}


<!-- In my MXML -->
<s:TextArea fontFamily="UbuntuMono" text="TEST" fontSize="36"/>

<!-- TEST is just rendered as Verdana. Any suggestions? -->

Solution

  • Re-created the project and all was well.