I am loading multiple swf files containing the different fonts at run-time. I am having problem when I am applying it to textflow in Rich Editable Text. Any Idea how to apply those custom fonts to the textflow ?
Here is the part of my code.
For registering the fonts
var FontClass:*;
var dom:ApplicationDomain = response.target.applicationDomain;
FontClass = dom.getDefinition(fileName) as Class;
Font.registerFont(FontClass);
Works!
For applying the font to textflow.
var cf:TextLayoutFormat = new TextLayoutFormat();
cf.fontFamily = mFontName; //Font Name
cf.fontLookup = FontLookup.EMBEDDED_CFF;
var editManager: IEditManager = IEditManager(textflow.interactionManager);
editManager.applyLeafFormat(cf);
No crash! Works!
But the applied font is not correct. Any suggestion please.