Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 173476

Re: Re: Dynamic textfield issue with some specific device fonts

$
0
0

Hi,

 

There appears to be a difference in the font-family name specified via Properties panel and the font that actually gets applied on the text field in Swf (for specific fonts only). This difference is causing the font to fallback to a default one instead of using the specified one. We'll log this as a bug and investigate internally.

 

In the meantime, you may add this function in your fla files to manually specify the correct font-family name via Actionscript.

 

import flash.text.TextFormat;

import flash.text.TextField;

 

fixFont(txtLabel, "ABCD 1234 !@#$") //txtLabel is the text instance name on stage

 

function fixFont(myTextInstance:TextField, myText:String) {

  myTextInstance.text = myText;

 

  var tf:TextFormat = myTextInstance.getTextFormat();

  tf.font="Arial Unicode MS";

  myTextInstance.setTextFormat(tf);

}


Hope this works for you.

-Nipun


Viewing all articles
Browse latest Browse all 173476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>