Tuesday, June 26, 2012

[Action Script] Font Embedding Not Working June,2012

Just tried embedding a font with code for the first time but nothing is appearing.

I've attached the doc.

Can anyone help??

I have exported the font to actionscript and this is the code:

import flash.text.TextField;
import flash.text.TextFormat;

var txt:TextField = new TextField();
var fmt:TextFormat = new TextFormat();

fmt.font = "Calibri";

txt.embedFonts = true;
txt.wordWrap = true;
txt.multiline = true;
txt.text = "The quick brown fox jumped over the lazy dog.";
txt.defaultTextFormat = fmt;

addChild(txt);
Attached Files File Type: zip EmbedText.fla.zip (4.3 KB)
Font Embedding Not Working

Related Post



0 comments: