Problem with StyleableTextField, the fontFamily is being ignored
Hello everyone,
We seem to be having an issue with StyleableTextField. The font does not work. The field is not picking up the font-family property.
Anyone has had this issue?
Kind regards.
Sample code here:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" creationComplete="initView()">
<fx:Script>
<![CDATA[
import com.lordalexworks.ReallyStyleableTextField;
import mx.collections.ArrayCollection;
import spark.components.supportClasses.StyleableTextField;
import spark.skins.mobile.*
private function initView():void
{
var styles:String = "a { color: #33CCFF; } a:hover { color: #3366CC; text-decoration: underline; } p{fontFamily:primer;}";
var myStyleSheet:StyleSheet = new StyleSheet();
myStyleSheet.parseCSS(styles);
var messageDisplay:StyleableTextField = StyleableTextField(createInFontContext(ReallyStyleableTextField));
messageDisplay.htmlText = "<p>Click <a href=\'http://www.adobe.com\'>here</a></p>";
messageDisplay.setStyle('skinClass',spark.skins.mobile.TextInputSkin);
messageDisplay.styleSheet = myStyleSheet;
var messageDisplay2:StyleableTextField = StyleableTextField(createInFontContext(ReallyStyleableTextField));
messageDisplay2.text = "Click Here";
vg.addElement(messageDisplay);
vg.addElement(messageDisplay2);
}
]]>
</fx:Script>
<s:VGroup id="vg" y="100"/>
</s:View>
