Copy link to clipboard
Copied
I have a movie that uses imported fonts:
In want to create TextFields via AS3 and use this improted font on it:
var tf:TextField = new TextField();
var format: TextFormat = new TextFormat();
format.font = "$ColdDefaultFont";
tf.text = "Some text";
tf.setTextFormat(format);
addChild(tf)
However the font is never displayed (just shows as squares). If i manually add a TextField to the stage and set it's character font to use this embedded font it works fine.
So what am I doing wrong here?
Thanks
Copy link to clipboard
Copied
I guess we can't edit previous posts on this forum (to correct typos, etc)???
Copy link to clipboard
Copied
Hi.
In my experience I learned that it's easier to place a text field instance inside of a Movie Clip or Sprite container and then add this container to the display list and let Animate handle the font embedding.
If you are not going to add dozens or hundreds of texts, I think the impact on the performance will be irrelevant.
Please tell us what you think.
Regards,
JC
Copy link to clipboard
Copied
Thanks for the response. Yes, this is actually exactly what I'm currently doing. It just seemed like a bit of a hack to me, however it does appear to work fine.
Cheers