I wrote an application with Action Script 3 to run on Android!Persian Fonts are true when running in the Windows operating system environment.
but when i export in Android , Persian font dose not work!!i embedded Font and a lot of things i did it but it is not successful.
the code is in bellow!
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.MouseEvent;
var t1:TextField=new TextField();
t1.text="سیدمحمدحسینی";
var tf:TextFormat=new TextFormat("F_titr",16,null,null,null,null,null,null,"right");
tf.align=TextFormatAlign.RIGHT;
var t2:TextField=new TextField();
t2.x=150;
t2.y=200;
t2.type=TextFieldType.INPUT;
t2.border=true;
t2.defaultTextFormat=tf;
addChild(t2);
var b1:button1=new button1();
b1.x=250;
b1.y=200;
addChild(b1);
b1.addEventListener(MouseEvent.CLICK,bb);
function bb(event:MouseEvent):void{
if(t2.text==t1.text){
t2.x=250;
trace("ok");
}else{
t2.x=50;
trace("no OK");
}
}
Copyright Notice:Content Author:「hosseini」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/44655077/font-does-not-work-in-the-application-written-by-actionscript-on-android