Embed fonts with html text
Hi,
Is it possible to embed font with in html text of a text field.
TextField.htmlText = "This is a sample of code that <font face='xyz'>I am using</font>";
here xyz is not a comon font. Please help.
Thanx
Hi,
Is it possible to embed font with in html text of a text field.
TextField.htmlText = "This is a sample of code that <font face='xyz'>I am using</font>";
here xyz is not a comon font. Please help.
Thanx
yes, use the textformat class and setTextFormat or css styling. or, you could add xyz to your library (new font), embed the needed characters, tick export for actionscript and assign a class (eg, XYZ) and use:
var xyzFont:Font=new XYZ();
tf.htmlText="This is a sample of code that <font face='"+xyzFont.fontName+"'>I am using</font>";
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.