AntiAliasing broken when using TLF with HtmlText
Hey Guys, I'm struggling with two issues using TLF within Flash CS5.
1) I'm unable to get Anti-aliasing to work when using TLFTextFields in combination with htmlText.
If I draw a TLFTextField on the stage within Flash IDE and set its Anti-aliasing to Readability then it will anti-alise correctly. If i dynamically change the .text property via AS3, then it still remains crisp, however If i change its .htmlText property Anti-aliasing is disabled and the text looks jagged.
e.g.
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.htmlText = "<p><font color='#000000' face='Century Gothic'>Testing <b>quick</b></font></p>";
tlfTxt.antiAliasType = AntiAliasType.ADVANCED;
addChild(tlfTxt);
What is the best way to achieve Anti-aliasing this way?
The same happens if I set a tlfMarkup and specify a TextFlow with styling.
Also how am I able to change weight when using TextFlow? If I have Century Gothic Regular and Bold each embedded within my library, and exported for Actionscript using DF4, which works using the above htmlText example, how do I get Bold to work using the below example?
var tFlow:String = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontFamily='Century Gothic' fontSize='24'><p>Testing <span fontStyle='bold'>quick</span></p></TextFlow>";
tlfTxt.tlfMarkup = tFlow;
2) I'm unable to get embedded fonts to work when using TextConverter.TEXT_FIELD_HTML_FORMAT
I can successfully use embedded fonts when using TextConverter.importToFlow(markup, TextConverter.PLAIN_TEXT_FORMAT); however as soon as I switch to using TextConverter.TEXT_FIELD_HTML_FORMAT the embedded fonts no longer work. Does anyone know how to overcome this?
Cheers,
Tim
