Hi,
I'm trying to embedd fonts to use with a TextArea that I have extended using the code below, but it doesn't work. I have used this code before with a TextFlow object and then set the containers with the flowComposer, but I can't get it to work with the TextArea.
When using the code below and set the text with setText, all I get is Times New Roman font. (Everything else is working fine)
<s:TextArea ... >
...
<fx:Style>
@font-face {
src: url("./fonts/arial.ttf");
font-family: ArialEmbedded;
}
</fx:Style>
...
public function setText(text:String):void
{
var format:TextLayoutFormat = new TextLayoutFormat();
format.color = 0x000000;
format.renderingMode = RenderingMode.CFF;
format.fontLookup = FontLookup.EMBEDDED_CFF;
var config:Configuration = new Configuration();
config.textFlowInitialFormat = format;
textFlow = TextConverter.importToFlow(text, TextConverter.TEXT_LAYOUT_FORMAT, config);
textFlow.interactionManager = new EditManager();
}
</s:TextArea>